1. 查看Linux服务器版本信息

# cat /etc/redhat-release

CentOS Linux release 7.4.1708 (Core)

2. 禅道开源版安装包下载

# wget http://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.8.2.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

【执行save命令时报错】:

# 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

8. 设置禅道服务自动启动,以保证每次服务器重启后禅道能够正常运行

1)编辑rc.local文件,在文件末尾添加禅道重启命令,保存后退出

# vim /etc/rc.local

……

/opt/zbox/zbox start

:wq

注:由于默认情况下rc.local文件无执行权限,故必须使用chmod +x /etc/rc.local修改为可执行权限。

2)重启服务器后,使用ps命令查看禅道服务是否自动启动

# ps aux | grep zbox

9. 打开浏览器,输入以下网址即可访问禅道

http://x.x.x.x:9000/zentao/

管理员登录的默认账号和密码:admin;123456

至此,禅道软件在Linux服务器上的部署已全部完成。