1、查看linux系统版本 uname -a

禅道 docker mysql远程 禅道服务器地址_禅道 docker mysql远程

2、禅道下载:http://www.zentao.net/download.html,找到要下载的版本,点击进入各平台下载;

禅道 docker mysql远程 禅道服务器地址_虚拟机禅道服务器ip_02

3、将下载好的安装包上传到linux系统/opt目录下,我使用的是

禅道 docker mysql远程 禅道服务器地址_mysql_03

4、在/opt 目录直接解压安安装包

tar -zxvf ZenTaoPMS.8.2.5.zbox_64.tar.gz -C /opt

禅道 docker mysql远程 禅道服务器地址_虚拟机禅道服务器ip_04

5、修改禅道自带apache、mysql端口

为了不占用Server上默认的80、3306端口,我们修改禅道自带的apache、mysql端口

修改禅道自带apache端口:
[root@xiaobing1]# /opt/zbox/zbox -ap 9000
修改禅道自带mysql端口:
[root@xiaobing1]# /opt/zbox/zbox -mp 9001

禅道 docker mysql远程 禅道服务器地址_重启_05

6、.重启禅道服务

[root@xiaobing1]# /opt/zbox/zbox start
Apache is running
Mysql is running

禅道 docker mysql远程 禅道服务器地址_禅道 docker mysql远程_06

执行/opt/zbox/zbox start 命令开启Apache和Mysql。

执行/opt/zbox/zbox stop 命令停止Apache和Mysql。

执行/opt/zbox/zbox restart 命令重启Apache和Mysql。

可以使用/opt/zbox/zbox -h命令来获取关于zbox命令的帮助

7、创建数据库账号

[root@xiaobing1 logs]# /opt/zbox/auth/adduser.sh
This tool is used to add user to access adminer
Account: adminer
Password: Adding password for user adminer

注:数据库的用户名:root,密码为空。数据库管理用的是adminer,但是为了安全,访问adminer的时候需要身份验证,需要运行脚本添加账户

命令行登录禅道自带mysql数据库:

/opt/zbox/bin/mysql -u root -P 3306 -p
命令行导入备份的数据:
/opt/zbox/bin/mysql -u root -P 3306 -p zentaopro < zentao.sql

如果是首次安装“禅道”,此处略过;如果之前已经装有“禅道”,想导入之前的数据,则可以导入备份的zentao.sql文件;

8、配置iptables防火墙规则,允许端口访问

[root@xiaobing1 logs]#iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
[root@xiaobing1 logs]#iptables -A INPUT -p tcp --dport 9001 -j ACCEPT
重启防火墙,使规则生效:
[root@xiaobing1 logs]#service iptables save
[root@xiaobing1 logs]#service iptables restart

补充参考:

怎么开启一个端口呢

添加

firewall-cmd --zone=public --add-port=80/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=80/tcp
删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent

9、浏览器访问

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

客户端:

http://x.x.x.x:9000/zentao/user-login-L3plbnRhby8=.html

默认账号密码:admin/123456

10、【补充部分】

服务器每次重启,“禅道”服务自动启动

1.编辑rc.local文件,添加shell命令

[root@xiaobing1]# vim /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#执行禅道服务启动脚本
/opt/zbox/zbox start
:wq 保存退出

2.重启服务器测试是否自动启动了“禅道”服务

ps aux | grep zbox

11、补充参考:

(1)firewalld的基本使用

启动: systemctl start firewalld

关闭: systemctl stop firewalld

查看状态: systemctl status firewalld

开机禁用  : systemctl disable firewalld

开机启用  : systemctl enable firewalld

(2)systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。

启动一个服务:systemctl start firewalld.service

关闭一个服务:systemctl stop firewalld.service

重启一个服务:systemctl restart firewalld.service

显示一个服务的状态:systemctl status firewalld.service

在开机时启用一个服务:systemctl enable firewalld.service

在开机时禁用一个服务:systemctl disable firewalld.service

查看服务是否开机启动:systemctl is-enabled firewalld.service

查看已启动的服务列表:systemctl list-unit-files|grep enabled

查看启动失败的服务列表:systemctl --failed

(3).配置firewalld-cmd

查看版本: firewall-cmd --version

查看帮助: firewall-cmd --help

显示状态: firewall-cmd --state

查看所有打开的端口: firewall-cmd --zone=public --list-ports

更新防火墙规则: firewall-cmd --reload

查看区域信息:  firewall-cmd --get-active-zones

查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0

拒绝所有包:firewall-cmd --panic-on

取消拒绝状态: firewall-cmd --panic-off

查看是否拒绝: firewall-cmd --query-panic

那怎么开启一个端口呢

添加
firewall-cmd --zone=public --add-port=80/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=80/tcp
删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent