Linux系統(虛擬機)安裝禪道


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

2、禪道下載:http://www.zentao.net/download.html,找到要下載的版本,點擊進入各平台下載;

3、將下載好的安裝包上傳到linux系統/opt目錄下,我使用的是

  

4、在/opt 目錄直接解壓安安裝包

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

  

5、修改禪道自帶apache、mysql端口

  為了不占用Server上默認的80、3306端口,我們修改禪道自帶的apache、mysql端口

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

  

6、.重啟禪道服務

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

執行/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、補充參考:

  CentOS7使用firewalld打開關閉防火牆與端口

  (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

轉載原文地址:http://www.jianshu.com/p/39beebc32b5e

轉載原文地址:https://www.cnblogs.com/moxiaoan/p/5683743.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM