『壹』 如何在Linux伺服器上部署禪道
1. 查看Linux伺服器版本信息
# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
2. 禪道開源版安裝包下載
# wgethttp://dl.cnezsoft.com/zentao/9.8.2/ZenTaoPMS.9.8.2.zbox_64.tar.gz
3. 直接解壓安裝包到/opt目錄下
// -C:Change to directory
# tar -zxvf ZenTaoPMS.9.0.1.zbox_64.tar.gz -C /opt
4. 修改禪道自帶apache、mysql埠
為了不佔用Server上默認的80、3306埠,我們修改禪道自帶的apache、mysql埠。你可以根據自己的喜好來修改埠。
1)修改禪道自帶的apache埠:
# /opt/zbox/zbox -ap 9000
2)修改禪道自帶的mysql埠:
# /opt/zbox/zbox -mp 9001
5. 啟動禪道服務
# /opt/zbox/zbox start
Apache is running
Mysql is running
註:你可以通過/opt/zbox/zbox stop命令終止以上服務,也可通過/opt/zbox/zbox restart命令重啟以上服務。
6. 配置iptables防火牆規則,允許埠訪問
# iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
# iptables -A INPUT -p tcp --dport 9001 -j ACCEPT
7. 重啟防火牆,使上述規則生效
# service iptables save
# service iptables restart
8. 設置禪道服務自動啟動,以保證每次伺服器重啟後禪道能夠正常運行
1)編輯rc.local文件,在文件末尾添加禪道重啟命令,保存後退出
# vim /etc/rc.local
……
/opt/zbox/zbox start
:wq
2)重啟伺服器後,使用ps命令查看禪道服務是否自動啟動
# ps aux | grep zbox
9. 打開瀏覽器,輸入以下網址即可訪問禪道
http://x.x.x.x:9000/zentao/
管理員登錄的默認賬號和密碼:admin;123456
至此,禪道軟體在Linux伺服器上的部署已全部完成。
問題及解決方案:
1. 在部署過程中,第7步執行時報錯:
# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
# service iptables restart
Redirecting to /bin/systemctl restart iptables.service
Failed to restart iptables.service: Unit not found.
解決方案:用如下命令安裝後,即可restart iptables service:
#yum install iptables-services