項目管理禪道

禪道介紹

禪道項目管理軟件是國產的開源項目管理軟件,專注研發項目管理,內置需求管理、任務管理、bug管理、缺陷管理、用例管理、計劃發佈等功能,實現了軟件的完整生命週期管理。
禪道屬於開源項目,有收費版,本次以開源版9.1.2進行搭建
禪道官網:http://www.zentao.net/

禪道 功能特點

  1. 甘特圖
    直觀瞭解項目整體進度
    實現標準的四種任務依賴關係
  2. 日曆
    待辦、日誌、任務一目瞭然
    靈活拖拽改變安排
  3. 文件導入導出
    批量導入導出需求、任務、BUG
    數據導入導出,一鍵完成
  4. 統計報表
    統計各個產品的用例數據
    統計各個版本的數據
  5. 日誌管理
    自動拼裝工作內容
    可導出,方便統計彙報
  6. 短信通知
    實現短信配置
    發送提醒短信
  7. GIT/SVN集成
    在線瀏覽GIT或SVN庫
    任務、Bug可關聯到代碼提交
  8. 水晶報表
    自定義sql查詢
    內置報表可編輯修改

禪道搭建環境LNMP/LAMP

提示:本地環境我們沒有安裝mysql,安裝禪道環境需要LNMP或者LAMP,本地以LAP進行演示
php版本5.5.30
nginx版本1.10.3
環境準備

  1. 配置repo源和安裝常用命令

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

    yum install -y net-tools vim wget lrzsz tree screen lsof tcpdump

  2. 關閉防火牆selinux

    /etc/init.d/iptables stop
    sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
    grep SELINUX=disabled /etc/selinux/config
    setenforce 0

  3. 調整文件描述符

    echo '* - nofile 100000 ’ >>/etc/security/limits.conf

  4. 更新系統並重啓
    yum update -y && reboot
    一、安裝nginx
    [root@abc ~]# wget http://nginx.org/download/nginx-1.10.3.tar.gz
    [root@abc ~]# yum install -y gcc glibc gcc-c++ prce-devel openssl-devel pcre-devel
    [root@abc ~]# useradd -s /sbin/nologin www -M
    [root@abc ~]# tar xf nginx-1.10.3.tar.gz && cd nginx-1.10.3

[root@abc ~]# ./configure --prefix=/usr/local/nginx-1.10.3 --user=nignx --group=nginx --with-http_ssl_module --with-http_stub_status_module
[root@abc ~]# make && make install
[root@abc ~]# ln -s /usr/local/nginx-1.10.3 /usr/local/nginx

[root@localhost nginx-1.10.1]# netstat -lntp|grep nginx

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      7058/nginx: master

啓動腳本
手動啓動
[root@abcdocker ~]# /usr/local/nginx/sbin/nginx

腳本啓動
#!/bin/bash

chkconfig: 2345 20 80

description: Saves and restores system entropy pool for \

##############################################
#date:2016.8.8
#QQ:604419314
#blog:www.abcdocker.com######################
 . /etc/init.d/functions 
path=/usr/local/nginx/sbin/nginx
if [ $# -ne 1 ];then
   echo "please input {status|start|stop|restart|reload}"
fi
nginx_status(){
status=`lsof -i:80|wc -l`
if [ $status -gt 2 ];then
   echo "nginx is running " 
   else
   echo  "nginx no running" 
fi
}
##################
nginx_start(){
  $path
  if [ $? -eq 0 ];then
     action "nginx start" /bin/true
  else
     action "nginx no start" /bin/false
  fi


}
nginx_stop(){
  $path -s stop
  if [ $? -eq 0 ];then
     action "nginx stop" /bin/true
  else
     action "nginx no stop" /bin/false
  fi
}
nginx_restart(){
  $path -s stop
  if [ $? -eq 0 ];then
     action "nginx stop" /bin/true
  else
     action "nginx no stop" /bin/false
  fi
  sleep 3
  $path
  if [ $? -eq 0 ];then
     action "nginx start" /bin/true
  else
     action "nginx no start" /bin/false
  fi
}
nginx_reload(){
  $path -s reload
  if [ $? -eq 0 ];then
     action "nginx reload" /bin/true
  else
     action "nginx no reload" /bin/false
  fi
}
case "$1" in
start)
     nginx_start
;;
stop)
     nginx_stop
;;
restart)
     nginx_restart
;;
reload)
     nginx_reload
;;
status)
     nginx_status
;;
esac

二、安裝PHP
本次php採用5.6.30
php下載目錄:http://php.net/downloads.php

安裝PHP基礎庫

yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y

yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -y

rpm -qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel

下載安裝
http://php.net/downloads.php

需要先安裝支持的軟件包

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz

tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install

PHP相關擴展庫

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum -y install libmcrypt-devel
yum -y install mhash
yum -y install mcrypt
yum -y install libmcrypt-devel

編譯

 ./configure \
--prefix=/usr/local/php5.6.30 \
--with-config-file-path=/usr/local/php56/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \
--with-readline

[root@abc ~]# make && make install
[root@abc ~]# ln -s /usr/local/php5.6.30/ /usr/local/php
[root@abc ~]# cp php5.6.30/php.ini-development /usr/local/php/lib/php.ini
[root@abc ~]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
啓動
手動啓動
[root@abc ~]# /usr/local/php/sbin/php-fpm

腳本啓動
#!/bin/bash

chkconfig: 2345 20 80

description: Saves and restores system entropy pool for \

##############################################

#date:2019.9.11

#blog:www.abcdocker.com######################
. /etc/init.d/functions 
path=/application/php/sbin/php-fpm 
status=`lsof -i:9000|wc -l`
########################
if [ $# -ne 1 ];then
   echo "please input {status|start|stop|restart}"
fi
php_status(){
if [ $status -lt 3 ];then
   echo "php no running"
else
   echo "php is running"
fi
}
php_start(){
  $path
      if [ $? -ne 0 ];then
    action "php running error" /bin/false
      else
    action "php is running" /bin/true
      fi
}
php_stop(){
  pkill php-fpm
      if [ $? -ne 0 ];then
    action "php stop error" /bin/false
      else
    action "php is stop" /bin/true
      fi
}
case "$1" in
status)
   php_status
;;
start)
   php_start
;;
stop)
   php_stop
;;
restart)
   php_stop
   sleep 3
   php_start
;;
esac

####################################
加入開機啓動

chkconfig --add php
chkconfig php on

php與nginx結合
nginx.conf配置如下
[root@php conf]# cat nginx.conf

  user  nginx;
    worker_processes  2;
    error_log  /var/log/nginx/error.log;
    pid        /var/run/nginx.pid;


events {
    use epoll;
    worker_connections  65535;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    server_tokens off;
    sendfile        on;
    tcp_nopush     on;
    keepalive_timeout  65;
    tcp_nodelay on;
    client_header_buffer_size 4k;
    open_file_cache max=65535 inactive=60s;
    open_file_cache_valid 80s;
    client_body_buffer_size 512k;
    large_client_header_buffers 4 512k;
    proxy_connect_timeout 30;
    proxy_read_timeout 60;
    proxy_send_timeout 20;
    proxy_buffering on;
    proxy_buffer_size 16k;
    proxy_buffers 4 64k;
    proxy_busy_buffers_size 128k;
    proxy_temp_file_write_size 128k;
    gzip  on;
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types text/plainapplication/x-javascript text/css application/xml;
    gzip_vary on;

include /application/nginx/conf/extra/*.conf;

}

server標籤配置如下
[root@php extra]# cat zentao.conf

server {

    listen       80;
    server_name  域名;
    access_log  /var/log/nginx/zentao_access.log main;
        root   /application/php_php/zentao/www;
    location / {
        index  index.php index.html index.htm;
    }
    location ~ .*\.(php|php5)?$ {
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi.conf;
    }
}

因爲我本次演示環境的架構屬於一臺沒有外網的web,通過nginx代理。下面是nginx代理的server標籤配置
nginx 代理節點server配置

upstream zentao {
    server 10.117.115.78;
}

server {
    listen       80;
    server_name  abc.com; 
    access_log  /var/log/nginx/zentao_access.log main;


    location / {
        root   html;
        index  index.html index.htm;

        proxy_pass  http://zentao;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size 300m;

    }

}

下載禪道
[root@abcdocker]# wget http://dl.cnezsoft.com/zentao/9.1.2/ZenTaoPMS.9.1.2.zip
將程序解壓訪問即可,我們nginx站點目錄設置如下:php_php/zentao/www;

直接訪問IP or域名 即可
配置
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
到這裏禪道的搭建就完成了。

也可以使用寶塔面板進行搭建,那樣搭建相對簡單很多,流程都差不多,下面簡單說說步驟

步驟

1、先把寶塔搭建好,用IP加端口訪問寶塔面板。
2、登錄寶塔面板,一鍵安裝LNMP/LAMP,選擇急速安裝就可以,那樣會快很多,基本上也可以沒有什麼問題
3、把下載好的禪道安裝包上傳至網頁根路徑,解壓
4、訪問,在線安裝。既可。

還有一種方法就是使用一鍵安裝的方式進行搭建

一、安裝XAMPP(Apache+MySQL+PHP+PERL)集成軟件包
1、下載XAMPP
32位xampp-linux-1.8.2-6-installer.run

http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.2/xampp-linux-1.8.2-6-installer.run/download

64位xampp-linux-x64-1.8.2-6-installer.run

http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.2/xampp-linux-x64-1.8.2-6-installer.run/download

2、安裝XAMPP
將XAMPP上傳到Linux服務器的tmp目錄,添加執行權限。執行安裝。

cd /tmp
chmod +x xampp-linux-x64-1.8.2-6-installer.run
./xampp-linux-x64-1.8.2-6-installer.run

下面是通過遠程連接Linux安裝過程顯示的信息,需要多次輸入y。
直接在Linux服務器上安裝會彈出安裝界面,一直點下一步就好了。

3、啓動XAMPP XAMPP安裝完成後,默認是啓動的,如果沒有啓動,可以通過下面命令啓動。

/opt/lampp/lampp start

停止 XAMPP /opt/lampp/lampp stop
重啓 XAMPP /opt/lampp/lampp restart
安全設置 /opt/lampp/lampp security 設置mysql ,ftp http xampp的密碼
卸載 XAMPP rm -rf /opt/lampp

二、安裝禪道項目管理軟件
1、下載禪道項目管理軟件源碼
下載站點1:http://sourceforge.net/projects/zentao/files/7.2/ZenTaoPMS.7.2.stable.zip/download
下載站點2:http://dl.cnezsoft.com/zentao/7.2/ZenTaoPMS.7.2.stable.zip
下載ZenTaoPMS.7.2.stable.zip後,解壓文件得到zentaopms,將zentaopms整個文件夾上傳到服務器的/opt/lampp/htdocs/目錄。
2、安裝禪道項目管理軟件
在瀏覽器中訪問http://192.168.50.199/zentaopms/www/index.php,會顯示出安裝頁面,換成服務器的IP地址。
安裝過程會進行系統環境檢查,如果出現檢查失敗的紅色提示,執行以下命令,給文件夾添加權限。

chmod o=rwx -R /opt/lampp/htdocs/zentaopms/tmp/
chmod o=rwx -R /opt/lampp/htdocs/zentaopms/www/data
chmod 777 -R  /opt/lampp/htdocs/zentaopms/config

執行完命令後,點擊刷新按鈕,全部檢查通過變成綠色,點擊下一步按鈕。
輸入數據庫服務器IP地址、服務器端口、數據庫用戶名、數據庫密碼、PMS使用的庫建表使用的前綴。這些都可以默認選項,直接點擊保存。清空現有數據:已經安裝了一遍,再次安裝刪除數據庫表和數據。
如果出現上面的提示,新建my.php文件,複製文本框中的內容到my.php中,把my.php放到/opt/lampp/htdocs/zentaopms/config/文件夾下。
輸入公司名稱、管理員賬號、管理員密碼。
安裝完成後,在瀏覽器中訪問http://127.0.0.1/zentaopms/www/index.php,換成服務器的IP地址。

/opt/lampp/bin/ XAMPP 命令庫。例如 /opt/lampp/bin/mysql 可執行 MySQL 監視器。
/opt/lampp/htdocs/ Apache 文檔根目錄。
/opt/lampp/etc/httpd.conf Apache 配製文件。
/opt/lampp/etc/my.cnf MySQL 配製文件。
cd PHP 配製文件。
/opt/lampp/etc/proftpd.conf ProFTPD 配製文件。(從 0.9.5 版開始)

/opt/lampp/phpmyadmin/config.inc.php 

phpMyAdmin 配製文件

當我們把xampp安裝好之後,其中的mariadb(或者說是mysql,mariadb是mysql的一個分支)其實是無法用navicat等可視化工具遠程連接的,這個時候我們需要先登錄mysql。
xampp一般安裝到/opt/lampp中,我們進入到bin目錄,執行

./mysql -u root -p
因爲root的默認密碼爲空,出現’Enter password:”後直接回車
接下來進入mysql數據庫,執行

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;

之後在刷新一下

flush privileges;

1
接下來我們就會發現可以通過root並輸入密碼123456進行遠程登錄
更換端口
xampp更換端口也是坑的一比。首先,我們進入安裝目錄下的etc文件夾,vi httpd.conf編輯配置文件,找到其中的“Listen 80”,更換後面的數字即可更換端口,之後在如示地方做如示修改

<Directory />
    AllowOverride AuthConfig
    Allow from all
    Require all granted
</Directory>

修改httd.conf配置文件
Alias /bitnami/ "/opt/lampp/apache2/htdocs/"
Alias /bitnami "/opt/lampp/apache2/htdocs"


#<Directory "/opt/lampp/apache2/htdocs">
#    Options Indexes FollowSymLinks
#    AllowOverride All
#    Order allow,deny
#    Allow from all
#</Directory>


<VirtualHost *:80>
	DocumentRoot '/opt/lampp/htdocs/zentaopms/www'
#	DocumentRoot '/opt/lampp/htdocs'
	ServerName galaxymacau.net        #這裏可以寫你配置的域名
	Directoryindex index.html index.php
	<Directory "/opt/lampp/apache2/htdocs">
    		Options Indexes FollowSymLinks
    		AllowOverride All
    		Order allow,deny
    		Allow from all
	</Directory>
</VirtualHost>

如有您更好的方法,請賜教。
謝謝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章