版本:??
centos? ? ? ?7.7
nginx? ? ? ? ?1.20.2
mariadb? ? ?5.5.68
php? ? ? ? ? ? 7.0.29? #禅道需要使用pdo, pdo_mysql, json, filter, openssl, mbstring, zlib, curl, gd, iconv这几个模块,需要确保PHP环境有加载这几个模块。
zentao? ? ? ? 16.5
安装lnmp过程就不说了,我直接贴配置文件。
zentao.conf?
server
{
listen 80;
server_name wojiuwangla.com;
index index.php index.html index.htm;
root /data/zentao/zentaopms/www;
location / {
index index.htm index.html index.php;
}
location ~ \.php/?.*$ {
root /data/zentao/zentaopms/www;
fastcgi_pass unix:/zentao/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #注意加上这行,否则php会空白
include fastcgi_params;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /var/log/nginx/zentao.log ;
}
php.ini,基本上默认的就可以,下面说一下禁用函数
disable_functions = gzuncompress,gzcompress,eval,base_convert,chop,gzcompress,gzuncompress,get_cfg_var,rewinddir,gethostbyname,ftp_connect,ftp_login,exec,system,chroot,chgrp,chown,chattr,shell_exec,proc_open,proc_get_status,error_log,ini_alter,ini_restore,dl,pfsockopen,syslog,readlink,stream_socker_server,putenv,mysql_field_len,mysql_field_name,mysql_field_type,pcntl_exec,mail,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,symlink,popepassthru,stream_socket_server,escapeshellcmd,popen,dl,syslog,show_source,socket_create,ssh2_exec,create_function,pack,posix_getpwuid,mysql_get_client_info,disk_free_space,disk_total_space,posix_getpwuid,posix_geteuid,getmyuid,get_current_user
www.conf ,PHP的配置文件
[www]
user = nobody
group = nobody
listen = /zentao/php-fpm.sock #端口监听也可以的,如果改监听端口记得nginx的proxy_pass改一下。
pm = dynamic
pm.max_children = 15
pm.start_servers = 5
pm.min_spare_servers = 3
pm.max_spare_servers = 10
my.cnf配置文件,默认的足矣,不过安全起见可以添加个参数,只允许127访问3306
bind-address=localhost
禅道网站根目录
mkdir /data/zentao/
cd /data/zentao
wget https://www.zentao.net/dl/zentao/16.5/ZenTaoPMS.16.5.php7.0.zip
unzip ZenTaoPMS.16.5.php7.0.zip
|