一、部署安装好Nginx
二、可以在apache内也可以做该配置,也就是在apache内配置禅道:
apache其实也是一样,但是要改配置文件:
vi etc/httpd/conf/httpd.conf
改里面的禅道路径
# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, 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 is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. ; ; The path can be defined as: ; ; 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 data in those directories. This is useful if ; your OS has problems with many files in one directory, and is ; a more efficient layout for servers that handle many sessions.
可以看到:server是apache
扫描二维码关注公众号,回复:
4598242 查看本文章
三、Nginx转发php设置:
在配置文件内更改:
vi /usr/local/nginx/conf/nginx.conf
server { listen 82; server_name localhost; location / { root /usr/local/zentaopms/www/; index index.php index.html index.htm; } location ~ .php$ { root /usr/local/zentaopms/www/; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/zentaopms/www/$fastcgi_script_name; include fastcgi_params; } error_page 500 502 503 504 /50x.html; }
我的禅道源码放在哪里?
在
/usr/local/zentaopms
将Nginx,reload一下
/usr/local/nginx/sbin/nginx -s reload
然后输入Nginx的ip:port/index.php,就可以开始安装禅道。
可以看到:server是nginx