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

禅道源码部署

文章目录

  • 禅道部署
    • 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 ServerCopyright (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" commonProxyRequests OffProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1<Directory "/var/www/html">Options noneAllowOverride noneRequire all granted</Directory>
</VirtualHost>[root@zentao conf.d]# cd ..
[root@zentao httpd]# cd conf
[root@zentao conf]# vim httpd.conf AddType application/x-compress .ZAddType application/x-gzip .gz .tgzAddType 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.lryc.cn/news/470333.html

相关文章:

  • ️ Vulnhuntr:利用大型语言模型(LLM)进行零样本漏洞发现的工具
  • 【Android】多渠道打包配置
  • Spring Boot Configuration和AutoConfiguration加载逻辑和加载顺序调整
  • 点餐系统需求分析说明书(软件工程分析报告JAVA)
  • Python条形图 | 指标(特征)重要性图的绘制
  • 危险物品图像分割系统:一键训练
  • 城市景色视频素材下载好去处
  • 基于SSM美容院管理系统的设计
  • Threejs 实现3D 地图(04)3d 地图的柱状图和文字显示
  • Oracle 第2章:安装与配置Oracle
  • 动态规划 —— 斐波那契数列模型-解码方法
  • PPT / Powerpoint中利用LaTeX输入公式
  • C++ 模板专题 - 类型擦除
  • RuoYi-Vue项目 重点代码讲解
  • pandas习题 024:用字典构造 DataFrame
  • 如何在Node.js中执行解压缩文件操作
  • 梦熊 CSP-S模拟赛 T3 youyou 的序列 II
  • 记录下docker部署gitlab-ce-17.5版本及客户端git拉取方式配置
  • opencv-platform实现人脸识别
  • leetcode 有重复字符串的排列组合
  • 【大数据学习 | kafka】kafka的组件架构
  • Python基于TensorFlow实现简单循环神经网络回归模型(SimpleRNN回归算法)项目实战
  • torch.isclose
  • Python记录-字典
  • python读取学术论文PDF文件内容
  • 5550 取数(max)
  • Windows常用网络命令
  • 地磁传感器(学习笔记上)
  • 使用 NumPy 和 Matplotlib 进行高级数据可视化:实践指南
  • mysql 启动报错 ‘/var/run/mysqld/mysqld.sock‘