在
之前的文章《關於CentOS YAPI部署(程式碼分享)》中,給大家介紹了CentOS安裝配置的問題。以下這篇文章給大家了解centos8中安裝禪道的步驟,有一定的參考價值,有需要的朋友可以參考一下,希望對你們有所助。
環境
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 用户)
這裡沒配好503,500
注意這裡使用連接埠和非連接埠的區別,和下面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 # 关闭服务
#mariadb 為mysql分支
資料庫安裝設置,重置資料庫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
下載網址:http://www.zentao.net/download.html
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
完成!
推薦學習:CentOS教學
以上是淺析centos8中安裝禪道的步驟(附代碼)的詳細內容。更多資訊請關注PHP中文網其他相關文章!

CentOS替代方案包括RockyLinux、AlmaLinux和OracleLinux。 1.RockyLinux和AlmaLinux提供與RHEL兼容的穩定發行版,適合需要長期支持的用戶。 2.CentOSStream適合關注新功能和開發週期的用戶。 3.OracleLinux適用於需要企業級支持的用戶。

CentOS需要替代品是因為CentOSStream不再提供長期支持。替代選項包括:1.RockyLinux,提供10年生命週期支持,適合需要穩定性的用戶。 2.AlmaLinux,同樣提供10年支持,有強大社區支持。 3.OracleLinux,提供與RHEL兼容的版本,生命週期管理靈活。

CentOS的終結對用戶產生了重大影響,用戶可選擇RHEL、AlmaLinux、Debian或Ubuntu作為替代方案。 1.遷移成本高,需時間和金錢。 2.社區分裂影響開源項目。 3.RHEL提供商業支持,但成本高。 4.AlmaLinux與CentOS相似,遷移成本低。 5.Debian和Ubuntu需更多時間適應。

CentOS適合作為企業級服務器操作系統,因為它穩定、安全且免費。 1)它基於RHEL,提供與RHEL高度的兼容性。 2)使用yum進行包管理,確保軟件安裝和更新簡便。 3)社區定期發布安全補丁,支持週期長達10年。

CentOS停止維護的原因是RedHat的戰略轉變,用戶應對策略包括:1.遷移到其他發行版,如UbuntuServer、Debian或RockyLinux;2.繼續使用CentOS7至2024年6月;3.轉向CentOSStream;4.自建解決方案,如基於RHEL的定制發行版或使用容器技術。

RedHatendedsupportforCentOStoshifttowardsacommerciallyfocusedmodelwithCentOSStream.1)CentOStransitionedtoCentOSStreamforRHELdevelopment.2)ThisencourageduserstomovetoRHEL.3)AlternativeslikeAlmaLinux,RockyLinux,andOracleLinuxemergedasreplacements.

CentOS是一個基於RedHatEnterpriseLinux的開源操作系統,適合服務器環境。 1.安裝時選擇合適的介質和選項,並配置網絡、防火牆和用戶權限。 2.使用useradd、usermod和systemctl命令進行用戶和服務管理,定期更新軟件包。 3.基本操作包括使用yum安裝軟件和systemctl管理服務,高級功能如SELinux增強安全性。 4.查看系統日誌解決常見錯誤,優化性能需監控資源和清理不必要文件。

CentOS因其卓越的安全性、稳定性和性能成为服务器和企业环境的首选。1)安全性通过SELinux提供强制访问控制,提升系统安全。2)稳定性得益于长达10年的LTS版本支持,确保系统稳定。3)性能通过优化内核和系统配置,显著提高系统响应速度和资源利用率。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

Atom編輯器mac版下載
最受歡迎的的開源編輯器

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

記事本++7.3.1
好用且免費的程式碼編輯器

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能