我們知道Debian 6已經(jīng)正式發(fā)布,下面老李就講一下如何在Debian 6安裝Cherokee+PHP5+MySQL。Cherokee是web服務(wù)器,可以和Nginx相媲美。
首先安裝MySQL5數(shù)據(jù)庫
apt-get install mysql-server mysql-client
安裝Cherokee
apt-get install cherokee
現(xiàn)在在瀏覽器輸入你的服務(wù)器IP,應(yīng)該可以看到如下界面:
![]() Debian 6安裝Cherokee+PHP5+MySQL
Cherokee服務(wù)器提供了WEB界面進(jìn)行控制臺操作,怎么進(jìn)行操作呢?
在SSH終端命令下輸入:cherokee-admin -b
將會顯示如下信息:
Login:
User: admin
One-time Password: 1Kkcc58atG8DNIM7
Web Interface:
URL: http://localhost:9090/
安裝PHP5 apt-get install php5-cgi
然后必須修改php.ini文件cgi.fix_pathinfo=1
vi /etc/php5/cgi/php.ini
[...]
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP’s
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting
; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://php.net/cgi.fix-pathinfo
cgi.fix_pathinfo=1
[...]
重啟Cherokee即可:
/etc/init.d/cherokee restart
|