mantis 2.5.0安装和配置
admin
2023-05-18 05:21:55
0

        缺陷管理平台Mantis,也做MantisBT,全称Mantis Bug Tracker。Mantis是一个基于PHP技术的轻量级的开源缺陷跟踪系统

mantis 2.5.0 

下载地址:https://jaist.dl.sourceforge.net/project/mantisbt/mantis-stable/2.5.0/mantisbt-2.5.0.tar.gz

一、php安装

yum install -y libxml2-devel openssl openssl-devel bzip2 bzip2-devel libpng libpng-devel freetype freetype-devel   libmcrypt-devel curl-devel readline-devel

1、下载php源码包

http://www.php.net/downloads.php

2 、安装php

tar -xvf php-5.5.13.tar.bz2

cd php-5.5.13

 ./configure --prefix=/usr/local/php --with-config-file-path=/etc --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --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 --without-sqlite3 --without-pdo-sqlite --with-pear

make 

make install

添加 PHP 命令到环境变量

vim /etc/profile

在末尾加入

PATH=$PATH:/usr/local/php/bin

export PATH

要使改动立即生效执行

. /etc/profile 或 source /etc/profile

查看环境变量

echo $PATH

查看版本 php -versoin

PHP 5.5.13 (cli) (built: Jan 19 2017 22:50:24) 

Copyright (c) 1997-2016 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

二、数据库安装

安装mysql、建立数据库

yum install -y mysql-server mysql-devel

    mysqladmin -uroot password 123456

mysql>create database mantis character set utf8;

mysql>grant all privileges on mantis.* to mantis@localhost identified by '654321';

mysql> flush privileges;

三、mantis配置

unzip mantisbt-2.5.0.zip

cd mantisbt-2.5.0

 pwd

/data/soft/mantis/mantisbt-2.5.0

四、nginx设置

vim mantis.conf

server {

        listen     7878;

       location ~*\.php$ {

          #root  "/data/soft/mantisbt-2.5.0";

          #root  "/data/soft/mantisbt";

          root  "/data/soft/mantis/mantisbt-2.5.0";

 index index.html index.php;

   fastcgi_pass 127.0.0.1:9000;

 fastcgi_index index.php;

          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

 includefastcgi_params;

         }



location ~ ^/(p_w_picpaths|javascript|js|css|flash|media|static|fonts|scripts)/  {

           root       "/data/soft/mantis/mantisbt-2.5.0"; 

           #access_log  off;

           expires     30d;

         }



        }

五、设置mantis

   http://ip:7878/admin/install.php

填写数据库用户名和密码

所有检查为good,会要求你把相关信息写入config/config_inc.php内如图:

mantis 2.5.0安装和配置

mantis的注册及修改需要通过邮件,所以需要配置邮件

mantis 2.5.0安装和配置

这么设置就可以发信了,

直接访问:http://ip:7878/my_view_page.php使用

mantis 2.5.0安装和配置

六,优化

用几天发现mantis发送邮件特慢,应该是php发送邮件的问题,需要进行优化下

第一,清理下堆积的队列,正常情况发送后会自动删除,直接清空表mantis_email_mantis里面数据

mysql> select *  from mantis_email_mantis;

Empty set (0.00 sec)

第二,修改下配置文件

vim config/config_inc.php

修改$g_email_send_using_cronjob = ON;

第三,需要加个crontab加速发邮件的速度

crontab -e

*/1 * * * * /usr/bin/php /data/soft/mantis/mantisbt-2.5.0/scripts/send_emails.php > /root/logs/mantis_sendmail.log 2>&1

第四,没了

试下,应该可以起飞了

注:第一次写博客,请多关照

相关内容

热门资讯

特朗普:霍尔木兹海峡已有协议,... 财联社8月3日电,美国总统特朗普表示,霍尔木兹海峡已有协议,无核化也将达成协议。正在以谈判的形式与伊...
中国地震局启动四级应急响应,现... 据中国地震台网正式测定,2026年8月3日2时21分,在四川宜宾市高县(北纬28.54度,东经104...
以称内塔尼亚胡通过特朗普社媒得... △特朗普社交媒体发文截图总台记者当地时间2日获悉,多名以色列官员称,在美国取消针对伊朗的既定袭击计划...
500左右的手柄怎么选?swi... 现在游戏手柄早已成为热门数码外设,跟风入手的玩家数不胜数,但不清楚500左右的手柄怎么选的人同样不在...
原创 美... 2026年1月1日,美国太空探索技术公司“星链”工程副总裁迈克尔尼科尔斯高调宣布,计划2026年降低...
原创 全... 现在的屏幕设计,拥有两大类型,分别是折叠屏、直板机,而类型之间拥有多种形态。其中的折叠屏,拥有阔折叠...
原创 流... 最近,通信圈的两则消息引发了轩然大波。一方面,中国电信宣布自8月1日起全面停止第三方互联网渠道的办卡...
伊朗重申霍尔木兹海峡不会恢复至... △伊朗外交部发言人巴加埃(资料图)当地时间2日,伊朗外交部发言人巴加埃表示,伊方重申,霍尔木兹海峡的...
伊朗外长:与阿曼谈判接近完成 △伊朗外交部长阿拉格齐(中)当地时间8月2日,伊朗外交部长阿拉格齐在政府内阁会议上介绍伊朗与阿曼谈判...
河南2026年“三支一扶”计划... 针对近期备受关注的2026年河南省“三支一扶”计划招募相关舆情,河南省“三支一扶”领导小组协调办公室...