一、禅道是啥

禅道是由青岛易软天创网络科技有限公司开发的,是第一款国产项目管理软件。它集产品管理、项目管理、质量管理、文档管理、组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整覆盖了研发项目管理的核心流程。禅道管理的思想注重实效,功能完备丰富,操作简洁高效,界面美观大方,搜索功能强大,统计报表丰富多样,软件架构合理,扩展灵活,有完善的API可以调用。

禅道的官网是https://www.zentao.net。进入官网中,可以看到有四个版本的禅道:企业版、专业版、集团版、开源版。这里要装的当然是开源版,如果你公司有钱,那请出门左转。

二、环境介绍

服务器

系统

安装应用

192.168.0.172

CentOS7.6

禅道(12.1.stable版本)

192.168.0.122

CentOS7.6

Mysql

其实在官网中已经有linux的一键安装包了,而且教程比较详细,有兴趣的可以移步"linux一键安装"。但是我还是比较喜欢自己部署应用,这样理解更深刻一点,也比较好管理。

三、安装

安装其实还是比较简单的,只需要我们安装apache、php、mysql之后,就可以将禅道运行起来。但是这里我用nginx代替apache,就是lnmp,毕竟平时用nginx比较多,而且现在apache正在逐渐的被nginx所取代。

1、安装mysql

详见Centos7安装Mysql5.7实录(yum+rpm+源码)。

安装好mysql之后,创建一个名为zentao的库

mysql>create database zentao DEFAULT CHARACTER SET utf8;
mysql>grant all on zentao.* to 'zentao'@'%' identified by 'Abc@123456';
mysql>flush privileges;
2、安装nginx

nginx的安装这里就不写了,有需要可以移步Nginx安装。

3、安装php

这里PHP是用5.6版本。

#添加yum源
[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

#安装php
[root@localhost ~]# yum install --enablerepo=remi,remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common
#注:安装5.6版本为remi-php56,安装5.5版本为remi-php55

#安装完值后查看php版本
[root@localhost ~]# php -v
PHP 5.6.40 (cli) (built: Feb 18 2020 08:36:40) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
    
#启动php-fpm
[root@localhost ~]# systemctl status php-fpm

#查看9000端口
[root@localhost ~]# netstat -ntlp |grep 9000
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      21963/php-fpm: mast
4、Nginx与Php-fpm结合

关于nginx是如何调用php的问题,可以直接移步到nginx如何调用PHP这篇文章,讲的很详细。这里主要讲安装,直接罗列出nginx的配置文件。

nginx的主配置文件nginx.conf配置如下:

[root@localhost ~]# cat /usr/local/nginx/conf/nginx.conf
user nginx nginx;
worker_processes  2;
error_log logs/error.log;
pid logs/nginx.pid;

events {
    use epoll;
    worker_connections  10240;
}
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" '
                      '$request_time $upstream_response_time $upstream_addr $upstream_status '
                      '$http_content_type $http_authorization $http_requestSource '
                      '$http_mobileName $http_mobileSystem $http_systemVersion $http_appVersion '
                      '$upstream_cache_status';

    log_format access_json '{"clientip":"$remote_addr",'
                            '"remoteuser":"$remote_user",'
                            '"timestamp":"$time_local",'
                            '"host":"$server_addr",'
                            '"request":"$request",'
                            '"status":"$status",'
                            '"size":"$body_bytes_sent",'
                            '"referer":"$http_referer",'
                            '"useragent":"$http_user_agent",'
                            '"xff":"$http_x_forwarded_for",'
                            '"responsetime":"$request_time",'
                            '"upstreamaddr":"$upstream_addr",'
                            '"upstreamtime":"$upstream_response_time",'
                            '"upstreamstatus":"$upstream_status",'
                            '"contenttype":"$http_content_type",'
                            '"authorization":"$http_authorization",'
                            '"requestSource":"$http_requestSource",'
                            '"mobileName":"$http_mobileName",'
                            '"mobileSystem":"$http_mobileSystem",'
                            '"systemVersion":"$http_systemVersion",'
                            '"appVersion":"$http_appVersion",'
                            '"upstreamcachestatus":"$upstream_cache_status"}';
                            
    access_log  logs/access.log  access_json;
    
    sendfile        on;
    keepalive_timeout  65;
    server_tokens off;

    gzip on;
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    gzip_http_version 1.0;
    gzip_comp_level 6;
    gzip_types       text/plain application/x-javascript text/css application/xml text/javascript text/script application/x-httpd-php application/javascript application/json;
    gzip_vary on;

    client_max_body_size 10m;
    client_body_buffer_size 2m;
    proxy_connect_timeout 75;
    proxy_send_timeout 75;
    proxy_read_timeout 75;
    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    proxy_temp_path /usr/local/nginx/proxy_temp 1 2;
    proxy_hide_header X-Powered-By;
    proxy_hide_header Server;

    include /usr/local/nginx/conf/vhosts/*.conf;
}

server标签配置如下:

[root@localhost ~]# cat /usr/local/nginx/conf/vhosts/zentao.conf 
server {
    listen       80;
    server_name  localhost;
    access_log  logs/zentao_access.log access_json;
    root   /data/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;
    }
}
5、下载禅道

下载地址在官网的相应版本的下载页面中可以找到,我的12.1.stable版本是在https://www.zentao.net/download/80204.html

[root@localhost ~]# mkdir -p /data
[root@localhost ~]# wget http://dl.cnezsoft.com/zentao/12.1/ZenTaoPMS.12.1.stable.zip
[root@localhost ~]# unzip ZenTaoPMS.12.1.stable.zip 
[root@localhost ~]# mv zentaopms /data/zentao
6、页面配置

在浏览器中直接输入IP或者域名就可以访问安装页面了。


禅道的底层架构 引擎 禅道平台_禅道的底层架构 引擎


禅道的底层架构 引擎 禅道平台_mysql_02


禅道的底层架构 引擎 禅道平台_php_03


禅道的底层架构 引擎 禅道平台_php_04


禅道的底层架构 引擎 禅道平台_nginx_05


禅道的底层架构 引擎 禅道平台_mysql_06


这里点击"登录禅道管理系统"。

禅道的底层架构 引擎 禅道平台_禅道_07


登录进来之后选择相应的流程。

禅道的底层架构 引擎 禅道平台_nginx_08


禅道的底层架构 引擎 禅道平台_php_09

到这里,一个免费版的禅道就安装好了。