当前位置: 首页 > article >正文

禅道源码部署

文章目录

  • 禅道部署
    • 1.环境部署
      • 安装httpd和mariadb
      • 安装php
    • 2.安装禅道
      • 首先进行httpd服务的配置
      • 安装禅道

禅道部署

1.环境部署

安装lamp环境

组件版本
httpdyum安装
mariadbyum安装
phpphp-7.4.33

在这里插入图片描述

选择一个php版本就行,我们这里选择的是7.4.33

安装httpd和mariadb

[root@zentao ~]# yum -y install httpd mariadb-server
##设置自启动
[root@zentao ~]# systemctl enable --now httpd
[root@zentao ~]# systemctl enable --now mariadb
##设置mariadb数据库密码
[root@zentao ~]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> set password = password('123456');
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

安装php

1.环境配置

[root@zentao ~]# yum -y install  libxml2-devel gcc-c++ openssl-devel sqlite-devel libcurl-devel readline-devel libpng-devel freetype-devel libzip-devel libjpeg-turbo-devel bzip2-devel

##安装oniguruma
[root@zentao ~]# tar xf oniguruma-6.9.4.tar.gz 
[root@zentao ~]# cd oniguruma-6.9.4
(这是安装oniguruma所需依赖)
[root@zentao oniguruma-6.9.4]# yum -y install whatprovides autoconf automake libtool
[root@zentao oniguruma-6.9.4]# ./autogen.sh 
Generating autotools files.
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'

Run ./configure, make, and make install.
[root@zentao oniguruma-6.9.4]# ./configure --prefix=/usr --libdir=/lib64
[root@zentao oniguruma-6.9.4]# make && make install

##降级libzip
[root@zentao ~]# yum -y remove libzip
[root@zentao ~]# tar xf libzip-1.2.0.tar.gz
[root@zentao ~]# cd libzip-1.2.0
[root@zentao libzip-1.2.0]# ./configure --prefix=/usr --libdir=/lib64
[root@zentao libzip-1.2.0]# make && make install

2.安装php

[root@zentao ~]# tar xf php-7.4.33.tar.gz
[root@zentao ~]# cd php-7.4.33
[root@zentao php-7.4.33]# ls
appveyor             buildconf.bat        docs        NEWS                 README.REDIST.BINS  travis               Zend
azure                CODING_STANDARDS.md  ext         pear                 run-tests.php       TSRM
azure-pipelines.yml  configure            EXTENSIONS  php.ini-development  sapi                UPGRADING
build                configure.ac         LICENSE     php.ini-production   scripts             UPGRADING.INTERNALS
buildconf            CONTRIBUTING.md      main        README.md            tests               win32
[root@zentao php-7.4.33]# ./configure --prefix=/usr/local/php7  \
--with-config-file-path=/etc \
--enable-fpm \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-soap \
--with-openssl \
--enable-bcmath \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif  \
--enable-ftp \
--enable-gd \
--with-jpeg \
--with-zlib \
--with-zlib-dir \
--with-freetype \
--with-gettext \
--enable-json \
--enable-mbstring \
--enable-pdo \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-readline \
--enable-shmop \
--enable-simplexml \
--enable-sockets \
--with-zip \
--enable-mysqlnd-compression-support \
--with-pear \
--enable-pcntl \
--enable-posix
[root@zentao php-7.4.33]# make -j $(cat /proc/cpuinfo |grep processor|wc -l)
[root@zentao php-7.4.33]# make install

3.配置环境变量和安装后配置

##环境变量配置
[root@zentao php-7.4.33]# echo 'export PATH=/usr/local/php7/bin:$PATH' > /etc/profile.d/php7.sh
[root@zentao php-7.4.33]# cp php.ini-production /etc/php.ini
[root@zentao php-7.4.33]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@zentao php-7.4.33]# chmod +x /etc/rc.d/init.d/php-fpm
[root@zentao php-7.4.33]# cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
[root@zentao php-7.4.33]# cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf

##编写php服务的单元文件
[root@zentao php-7.4.33]# cat > /usr/lib/systemd/system/php-fpm.service <<EOF
[Unit]
Description=php-fpm server daemon
After=network.target

[Service]
Type=forking
ExecStart=/etc/init.d/php-fpm start
ExecStop=/etc/init.d/php-fpm stop
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
EOF

##配置fpm的相关选项为你所需要的值:
[root@zentao php-7.4.33]# cat <<EOF >> /usr/local/php7/etc/php-fpm.conf
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 2
pm.max_spare_servers = 8
EOF

##加载配置文件并设置php开机自启
[root@zentao php-7.4.33]# systemctl daemon-reload
[root@zentao php-7.4.33]# systemctl enable --now php-fpm
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.
[root@zentao php-7.4.33]# ss -antl
State      Recv-Q Send-Q                 Local Address:Port                                Peer Address:Port              
LISTEN     0      128                        127.0.0.1:9000                                           *:*                  
LISTEN     0      50                                 *:3306                                           *:*                  
LISTEN     0      128                                *:22                                             *:*                  
LISTEN     0      100                        127.0.0.1:25                                             *:*                  
LISTEN     0      128                               :::80                                            :::*                  
LISTEN     0      128                               :::22                                            :::*                  
LISTEN     0      100                              ::1:25                                            :::*

2.安装禅道

首先进行httpd服务的配置

[root@zentao ~]# find / -name *vhosts.conf
/usr/share/doc/httpd-2.4.6/httpd-vhosts.conf
[root@zentao ~]# cd /etc/httpd
[root@zentao httpd]# cd conf.d
[root@zentao conf.d]# cp /usr/share/doc/httpd-2.4.6/httpd-vhosts.conf vhosts.conf
[root@zentao conf.d]# vim vhosts.conf 
[root@zentao conf.d]# cat vhosts.conf 
<VirtualHost *:80>
    DocumentRoot "/var/www/html"
    ErrorLog "/var/log/httpd/zentao-error_log"
    CustomLog "/var/log/httpd/zentao-access_log" common
    ProxyRequests Off
    ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1
    <Directory "/var/www/html">
        Options none
        AllowOverride none
        Require all granted
    </Directory>
</VirtualHost>

[root@zentao conf.d]# cd ..
[root@zentao httpd]# cd conf
[root@zentao conf]# vim httpd.conf 
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php    ;添加这一行
    AddType application/x-httpd-php-source .phps    ;添加这一行
[root@zentao conf]# vim httpd.conf 
[root@zentao conf]# grep -C1 'index.html' httpd.conf 
<IfModule dir_module>
    DirectoryIndex index.php index.html   ;将index.php放在index.html前面
</IfModule>

##重启httpd服务
[root@zentao conf]# systemctl restart httpd

##关闭防火墙
[root@zentao ~]# systemctl disable --now firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@zentao ~]# setenforce 0

安装禅道

[root@zentao ~]# unzip ZenTaoPMS-20.7.1-php7.2_7.4.zip
[root@zentao ~]# cp -r zentaopms/ /var/www/html/

在这里插入图片描述

本机ip+指定路径访问安装界面

在这里插入图片描述

按照要求修改权限

[root@zentao html]# chmod 777 -R /var/www/html/zentaopms/tmp/
[root@zentao html]# chmod 777 -R /var/www/html/zentaopms/www/data

在这里插入图片描述

权限修改完成之后下一步即可

在这里插入图片描述

数据库密码为之前给mariadb设置的密码

在这里插入图片描述

下一步即可

在这里插入图片描述

出现没有生成配置文件的报错

查阅开发者社区的建议是

可以将zentaopms/config/config.php中的下面一行修改为true,开启自定义session:
$config->customSession = true;

[root@zentao html]# cd zentaopms/
[root@zentao zentaopms]# cd config/
[root@zentao config]# vim config.php 
[root@zentao config]# grep -C1 'customSession' config.php
$config->customSession = true;

在这里插入图片描述

成功生成配置文件,安装下面黄字的提示操作即可

[root@zentao config]# vim  /var/www/html/zentaopms/config/my.php
[root@zentao config]# cat /var/www/html/zentaopms/config/my.php
<?php
$config->installed       = true;
$config->debug           = false;
$config->requestType     = 'GET';
$config->timezone        = 'Asia/Shanghai';
$config->db->driver      = 'mysql';
$config->db->host        = '127.0.0.1';
$config->db->port        = '3306';
$config->db->name        = 'zentao';
$config->db->user        = 'root';
$config->db->encoding    = 'UTF8';
$config->db->password    = '123456';
$config->db->prefix      = 'zt_';
$config->webRoot         = getWebRoot();
$config->default->lang   = 'zh-cn';

在这里插入图片描述

按需选择功能

在这里插入图片描述

填入管理员账号和密码,按需填写公司名称

在这里插入图片描述

安装完成

在这里插入图片描述


http://www.kler.cn/news/367808.html

相关文章:

  • Spring中导致事务传播失效的情况(自调用、方法访问权限、异常处理不当、传播类型选择错误等。在实际开发中,务必确保事务方法正确配置)
  • 2024 7月算法刷题记录
  • 【2024|滑坡数据集论文解读3】CAS滑坡数据集:用于深度学习滑坡检测的大规模多传感器数据集
  • ​Java基础面试题--
  • 使用FRP搭建内网穿透服务(新版toml配置文件,搭配反向代理方便内网网站访问)【使用frp搭建内网穿透】
  • 重构案例:将纯HTML/JS项目迁移到Webpack
  • 全能大模型GPT-4o体验和接入教程
  • vim的使用方法
  • 基于Java(SSM框架)+MySQL开发的小型英语学习网站
  • 高级sql技巧
  • 【利用Seaborn进行高级数据可视化】创建美观且信息丰富的图表!
  • Axios get请求数组参数移除默认的[]
  • Python 判断键是否存在字典中(新手入门、实战案例)
  • 【计网】从零开始认识IP协议 --- 理解网段划分,NAT策略,私有IP和公网IP,认识公网
  • HuggingFace应用——自然语言处理(1):什么是NLP?什么是Transformer?
  • 第23周Java主流框架入门-SpringMVC 3.拦截器
  • C++游戏开发中的多线程处理是否真的能够显著提高游戏性能?如果多个线程同时访问同一资源,会发生什么?如何避免数据竞争?|多线程|游戏开发|性能优化
  • 学习pytorch
  • Python RabbitMQ 消息队列监听
  • w001基于SpringBoot的在线拍卖系统
  • React Native 项目使用Expo模拟器运行iOS和Android
  • 【线下培训】龙信科技应邀参与了由教育部网络安全与执法虚拟教研室(中国刑事警察学院)举办的学术讲座
  • android手动用证书签名apk apksigner工具
  • Unity3D学习FPS游戏(2)简单场景、玩家移动控制
  • gin入门教程(2):go安装以及初始目录构建
  • 简化深度学习实验管理:批量训练和自动记录方案