一、部署安装好Nginx
二、可以在apache内也可以做该配置,也就是在apache内配置禅道:
apache其实也是一样,但是要改配置文件:
vi etc/httpd/conf/httpd.conf
改里面的禅道路径
# DocumentRoot: The directory outof which you will serve your
# documents. Bydefault, all requests are taken from thisdirectory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot"/usr/local/zentaopms/www"#
重启apache:
service httpd restart
然后输入apache的ip:port/index.php,就可以开始安装禅道
安装禅道的问题:可能会遇见session.save_path不存在不可用的问题
1、先修改这三个文件的执行权限
chmod o=rwx -R /opt/zentaopms/tmp/chmod o=rwx -R /opt/zentaopms/www/data
chmod o=rwx -R /var/lib/php/session
2、改php.ini配置文件(改一个地方就ok,不要瞎改)
vi /etc/php.ini
; Argument passed to save_handler. In the case of files, this isthe path
;where data files are stored. Note: Windows users have to change this; variablein order to use PHP‘s session functions.
;
; The path can be definedas:
;
; session.save_path= "N;/path"session.save_path= "/var/lib/php/session";where N is an integer. Instead of storing all the session files in;/path, what this will do is use subdirectories N-levels deep, and
; store the session datain those directories. This is useful if; your OS has problems with many filesin one directory, and is; a more efficient layoutfor servers that handle many sessions.
可以看到:server是apache
三、Nginx转发php设置:
在配置文件内更改:
vi /usr/local/nginx/conf/nginx.conf
server {
listen82;
server_name localhost;
location/{
root/usr/local/zentaopms/www/;
index index.php index.html index.htm;
}
location~.php$ {
root/usr/local/zentaopms/www/;
fastcgi_pass127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME/usr/local/zentaopms/www/$fastcgi_script_name;
include fastcgi_params;
}
error_page500 502 503 504 /50x.html;
}
我的禅道源码放在哪里?
在
/usr/local/zentaopms
将Nginx,reload一下
/usr/local/nginx/sbin/nginx -s reload
然后输入Nginx的ip:port/index.php,就可以开始安装禅道。
可以看到:server是nginx