环境
CentOS 8 + 禅道15.x + Nginx + Mysql + PHP
PHP配置
centos自带的有php环境
sudo dnf module list php # 查看版本,默认7.2
安装php7.2以及所需组件
sudo dnf install php php-pdo php-gd php-mbstring php-mysqlnd php-ldap php-json php-xml php-zip
重启服务
systemctl start php-fpm.service #开启 systemctl status php-fpm.service #查看状态 systemctl enable php-fpm.service #开机启动
权限配置,编辑www.conf
vi /etc/php-fpm.d/www.conf
找到做修改
user = (非root 用户) group = (非root 用户)
注意这里使用端口和非端口的区别,和下面nignx配置对应
;listen = /run/php-fpm/www.sock listen = 9000
配置好了重启
systemctl restart php-fpm.service
Mysql安装配置
安装mariadb
dnf -y install mariadb mariadb-server systemctl start mariadb.service # 开启服务 systemctl enable mariadb.service # 开机启动 systemctl status mariadb.service # 查看服务状态 systemctl stop mariadb.service # 关闭服务
数据库安装设置,重置数据库root账号密码,执行该命令前必须开启mariadb服务。
mysql_secure_installation Enter current password for root (enter for none): 输入当前root账号密码,刚安装默认为空,直接回车即可 Set root password? [Y/n] 是否输入root密码,输入y 回车 New password: 输入密码 Re-enter new password: 重复输入 Remove anonymous users? [Y/n] 删除其他用户 y Disallow root login remotely? [Y/n] 允许root账号远程登录 y Remove test database and access to it? [Y/n] 删除测试表 y Reload privilege tables now? [Y/n] 重新加载配置表 y 登陆测试,执行如下命令并输入密码。 mysql -uroot -p
mariadb的远程链接配置
select User, host from mysql.user;
输出
+------+-----------+ | User | host | +------+-----------+ | root | 127.0.0.1 | | root | ::1 | | root | localhost | +------+-----------+
允许外部ip连接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
输出
+------+-----------+ | User | host | +------+-----------+ | root | % | | root | 127.0.0.1 | | root | ::1 | | root | localhost | +------+-----------+
允许单独的ip链接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.%' IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
最后一步还需要配置防火墙 / 安全策略组,开放3306 端口
安装禅道v15.x
wget https://www.zentao.net/dl/zentao/15.0.3/ZenTaoPMS.15.0.3.zip dnf -y install unzip # 安装unzip解压 ,有就不装 unzip ZenTaoPMS.11.5.stable.zip # 解压禅道源码包
Nginx绑定域名
yum install nginx # 有就跳过 systemctl start nginx.service
权限
vi /etc/nginx/nginx.conf
找到
user = root
代理配置
vi /etc/nginx/conf.d/zentao.conf server{ server_name xxx.com; client_max_body_size 1000M; root /home/[user]/www/zentaopms/www; location / { root /home/{user}/www/zentaopms/www; index index.php index.html index.htm; } location ~ .*\.php$ { fastcgi_pass 127.0.0.1:9000; #注意这里和php 配置对应 #fastcgi_pass unix:/run/php-fpm/www.sock fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include fastcgi_params; include fastcgi.conf; } # https #listen 443 ssl; #ssl_certificate /etc/nginx/cer/fullchain.crt; #ssl_certificate_key /etc/nginx/cer/private.pem; #ssl_protocols TLSv1.1 TLSv1.2; #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; #ssl_prefer_server_ciphers on; #ssl_session_cache shared:SSL:10m; #ssl_session_timeout 10m; } #server{ # if ($host = xxx.com) { # return 301 https://$host$request_uri; # } # server_name xxx.com; # listen 80; # return 404; #}
重启服务
nginx -s reload
完工!
以上就是“浅析centos8中安装禅道的步骤(附代码) 安装禅道的基本步骤”的详细内容,更多请关注1818ip网其它相关文章!
相关文章
标签:CentOS
- •centos中的uuid是必须的吗 centos安装minicom必须联网吗
- •centos如何查看用户 centos如何查看用户密码
- •centos重启后时间不对怎么办 centos时间不同步怎么解决
- •如何解决centos7下chrome打不开的问题 centos安装chrome
- •centos下ping不通网关怎么办 centos ping不通网关怎么解决
- •centos7系统找不到网卡 centos7装完系统找不到网卡
- •centos中pear命令无法使用怎么办 pear是什么意思
- •centos怎么实现开机进入命令行模式 centos7开机进入命令行模式
- •centos无法进入图形界面怎么解决 centos无法进入图形界面
- •centos默认用户名密码是什么 centos默认用户名密码