本文基于WLNMP一键安装包安装禅道12.4
当前系统及应用版本:Centos7.x、nginx、php7.2、mysql5.6
请严格按照本文步骤进行安装,擅自更改步骤可能会导致安装失败!
1、配置epel源
yum install epel-release
2、添加wlnmp一键安装包源
rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
3、安装基础环境及依赖包
yum install wnginx wphp72 wmysql56 unzip wget
4、配置zentao目录,下载zentao
mkdir /data/zentao
cd /data/zentao
wget http://dl.cnezsoft.com/zentao/12.4/ZenTaoPMS.12.4.stable.zip
unzip ZenTaoPMS.12.4.stable.zip
chown -R www.www /data/zentao/zentaopms/
5、配置session目录
mkdir /data/zentao/session
chown -R www.www /data/zentao/session
chmod -R 777 /data/zentao/session/
编辑php.ini
vim /usr/local/php/etc/php.ini
将;session.save_path = "/tmp"修改成session.save_path = "/data/zentao/session"
保存退出重启php
/etc/init.d/php-fpm72 restart
6、修改MySQL密码
默认密码为空,直接回车即可
mysql -uroot -p
mysql> set password = password('blog.whsir.com');
7、配置nginx
vim /usr/local/nginx/conf/vhost/demo.conf
删除原有内容,复制以下内容,可自行修改server_name地址
server
{
listen 80;
server_name _;
index index.php index.html index.htm default.php default.htm default.html;
root /data/zentao/zentaopms/www;
error_page 404 /404.html;
error_page 502 /502.html;
include enable-php72.conf;
if (!-d $request_filename){
set $rule_0 1$rule_0;
}
if (!-f $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite /(.*)$ /index.php/$1 last;
}
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
location ~ \.well-known{
allow all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log off;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log off;
access_log off;
}
access_log /data/logs/nginx/www.zentao.com.log;
error_log /data/logs/nginx//www.zentao.com.error.log;
}
保存退出重启nginx
/etc/init.d/nginx restart
8、安装禅道
至此禅道配置完成