1.查看linux服務(wù)器的版本
lsb_release -a (適用于所有的linux,包括Redhat蹋凝、SuSE、Debian等發(fā)行版,但是在debian下要安裝lsb)
2.下載對(duì)應(yīng)的禪道服務(wù)部署包
Linux 64位一鍵安裝包(適用于Linux 64位)
下載站點(diǎn)1:http://sourceforge.net/projects/zentao/files/10.6/ZenTaoPMS.10.6.stable.zbox_64.tar.gz/download
下載站點(diǎn)2:http://dl.cnezsoft.com/zentao/10.6/ZenTaoPMS.10.6.stable.zbox_64.tar.gz國(guó)際版
下載站點(diǎn)1:http://sourceforge.net/projects/zentao/files/10.6/ZenTaoPMS.10.6.stable.int.zbox_64.tar.gz/download
下載站點(diǎn)2:http://dl.cnezsoft.com/zentao/10.6/ZenTaoPMS.10.6.stable.int.zbox_64.tar.gznote:由于我的服務(wù)器是64位的感凤,在這里我就只放出來(lái)64位系統(tǒng),其他的可自行到禪道官網(wǎng)下載對(duì)應(yīng)版本
下載地址:https://www.zentao.net/download.html
3.將文件上傳至opt目錄
4.將文件解壓到opt目錄
sudo tar -zxvf ZenTaoPMS.11.6.4.zbox_64.tar.gz -C /opt
特別說(shuō)明:
不要解壓到別的目錄再拷貝到/opt/粒督,因?yàn)檫@樣會(huì)導(dǎo)致文件的所有者和讀寫權(quán)限改變陪竿,也不要解壓后把整個(gè)目錄777權(quán)限。
5.修改禪道自帶apache屠橄、mysql端口
- 修改禪道自帶的apache端口:
[root@Vcentos ~]# /opt/zbox/zbox -ap 9000
- 修改禪道自帶的mysql端口:
[root@Vcentos ~]# /opt/zbox/zbox -mp 9001
5.啟動(dòng)禪道服務(wù)
[root@centos ~]# /opt/zbox/zbox start
Apache is running
Mysql is running
注:你可以通過(guò)/opt/zbox/zbox stop命令終止以上服務(wù)族跛,也可通過(guò)/opt/zbox/zbox restart命令重啟以上服務(wù)。
6.配置防火墻規(guī)則锐墙,允許端口訪問(wèn)
centos7+防火墻配置有點(diǎn)不一樣
1.使用如下代碼配置9000端口允許訪問(wèn)
firewall-cmd --permanent --add-port=9000/tcp
提示FirewallD is not running
firewalld的基本使用
啟動(dòng): systemctl start firewalld
關(guān)閉: systemctl stop firewalld
查看狀態(tài): systemctl status firewalld
開機(jī)禁用 : systemctl disable firewalld
開機(jī)啟用 : systemctl enable firewalld
2.接下開啟Firewall礁哄,各提示信息如下圖所示
相關(guān)代碼如下
[root@acb-dfjeifnefei ~]# #啟動(dòng)防火墻
[root@acb-dfjeifnefei ~]# systemctl start firewalld
Failed to start firewalld.service: Unit is masked.
[root@acb-dfjeifnefei ~]# # 啟動(dòng)失敗,提示masked 解除mask
[root@acb-dfjeifnefei ~]# systemctl unmask firewalld.service
Removed symlink /etc/systemd/system/firewalld.service.
[root@acb-dfjeifnefei ~]# #再次啟動(dòng)
[root@acb-dfjeifnefei ~]# systemctl start firewalld.service
[root@acb-dfjeifnefei ~]# #再次查看狀態(tài)
[root@acb-dfjeifnefei ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2019-10-26 19:33:16 CST; 10s ago
Docs: man:firewalld(1)
Main PID: 4728 (firewalld)
CGroup: /system.slice/firewalld.service
└─4728 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Oct 26 19:33:16 acb-dfjeifnefei systemd[1]: Starting firewalld - dynamic firewall daemon...
Oct 26 19:33:16 acb-dfjeifnefei systemd[1]: Started firewalld - dynamic firewall daemon.
[root@acb-dfjeifnefei ~]# # 查看防火墻狀態(tài)
[root@acb-dfjeifnefei ~]# firewall-cmd --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
3.添加9000端口訪問(wèn)權(quán)限
相關(guān)代碼如下
[root@acb-dfjeifnefei ~]# firewall-cmd --permanent --add-port=9000/tcp
success
[root@acb-dfjeifnefei ~]# firewall-cmd --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@acb-dfjeifnefei ~]# firewall-cmd --reload
success
[root@acb-dfjeifnefei ~]# # 查看端口啟用情況
[root@acb-dfjeifnefei ~]# firewall-cmd --query-port=9000/tcp
yes
[root@acb-dfjeifnefei ~]# # 查看防火墻狀態(tài)
[root@acb-dfjeifnefei ~]# firewall-cmd --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports: 9000/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
設(shè)置防火墻開機(jī)自啟systemctl enable firewalld
[root@acb-dfjeifnefei ~]# systemctl enable firewalld
9.打開瀏覽器贮匕,輸入以下網(wǎng)址訪問(wèn)禪道
結(jié)果提示訪問(wèn)還是不能成功姐仅,經(jīng)過(guò)很多的資料查詢,發(fā)現(xiàn)阿里云centos7+需要在安全組配置防火墻規(guī)則才能正常訪問(wèn)刻盐。
添加規(guī)則
再次訪問(wèn)掏膏,可以成功訪問(wèn)
但是還有一個(gè)情況,服務(wù)器一旦重啟敦锌,需要收到開啟禪道服務(wù)馒疹,我們可以設(shè)置禪道隨服務(wù)器啟動(dòng)的自動(dòng)啟動(dòng)
10.設(shè)置禪道開機(jī)自啟
- 在/etc/rc.local 中添加 /opt/zbox/zbox start
vim /etc/rc.local
2.修改rc.local權(quán)限
chmod 775 /etc/rc.d/rc.local
注意:/etc/rc.local 這個(gè)目錄下的rc.local文件是個(gè)鏈接文件,實(shí)際該文件是在/etc/rc.d/目錄下乙墙,所以賦權(quán)時(shí)要找到原文件颖变。