在云服务器部署禅道
- 系统环境:云服务器;Centos 7.0
- 工具:禅道的压缩包(需要是tar.gz文件名的)、Xshell、Xftp;
- 安全组规则的设置;
- 端口号的设置
详细步骤:
1、xshell连接云服务器;使用Xshell连接服务器,Xftp进行文件的上传;
2、禅道官网下载http://dl.cnezsoft.com/zentao/9.8.3/ZenTaoPMS.9.8.3.zbox_64.tar.gz安装包
3、上传到/opt目录下,输入cd /opt进入到opt目录下,解压安装包,输入指令
tar -xzvf ZenTaoPMS.9.8.3.zbox_64.tar.gz
4、修改禅道自带的Apache和mysql端口号,输入指令
/opt/zbox/zbox -ap 9095
/opt/zbox/zbox -mp 9096
5、执行 /opt/zbox/zbox start ,重启禅道
6、创建数据库账号 /opt/zbox/auth/adduser.sh
This tool is used to add user to access adminer
Account: adminer
Password: 123456
7、开放防火墙端口
cd /etc/sysconfig
vim iptables,打开文件后,点击i进入编辑状态,输入以下内容:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9096 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9095 -j ACCEPT
点击esc退出编辑状态,输入:wq保存并退出,执行 /bin/systemctl restart iptables重启防火墙。
说一下重启防火墙遇到的坑
第一种:
提示 Failed to restart iptables.service: Unit not found.
由于我使用的是新的腾讯云服务器;centos7后是使用的基于iptable的systemctl stop firewalld
执行指令1
#安装iptables服务
yum install iptables-services
#关闭firewalld服务
systemctl stop firewalld
第二种:
重启提示“Job for iptables.service failed because the control process exited with error code. See “systemctl status iptables.service” and “journalctl -xe” for details.”
输入“systemctl status iptables.service"查到报错原因:
Line1 failed错误依次执行指令:
iptables -N RH-Firewall-1-INPUT
service iptables save
再次重启iptables,应该就可以了。
或者
Line 14 faild错误 重启防火墙报错,如图所示,然后我就查看防火墙状态,提示Failed to start IPv4 firewall with iptables
然后找到配置文件,打开发现把端口号放错位置了,应加在commit前面
成功状态如下图所示
也许还有其他情况,百度吧!
8、防火墙端口号开放后,还需登录阿里云控制台,配置安全组规则,可以参照规则进行配置:https://www.cnblogs.com/sunlxp/p/8006979.html
还有下面是简单粗暴的,全部打开!
9、此时禅道部署成功,输入IP+端口号(此处就是ip地址:9095)可以正常访问了