溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mantis 2.5.0安裝和配置

發(fā)布時間:2020-10-16 07:04:02 來源:網(wǎng)絡 閱讀:3325 作者:wll0304 欄目:MySQL數(shù)據(jù)庫

        缺陷管理平臺Mantis,也做MantisBT,全稱Mantis Bug Tracker。Mantis是一個基于PHP技術的輕量級的開源缺陷跟蹤系統(tǒng)

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 命令到環(huán)境變量

vim /etc/profile

在末尾加入

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

export PATH

要使改動立即生效執(zhí)行

. /etc/profile 或 source /etc/profile

查看環(huán)境變量

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

二、數(shù)據(jù)庫安裝

安裝mysql、建立數(shù)據(jù)庫

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

填寫數(shù)據(jù)庫用戶名和密碼

所有檢查為good,會要求你把相關信息寫入config/config_inc.php內如圖:

mantis 2.5.0安裝和配置

mantis的注冊及修改需要通過郵件,所以需要配置郵件

mantis 2.5.0安裝和配置

這么設置就可以發(fā)信了,

直接訪問:http://ip:7878/my_view_page.php使用

mantis 2.5.0安裝和配置

六,優(yōu)化

用幾天發(fā)現(xiàn)mantis發(fā)送郵件特慢,應該是php發(fā)送郵件的問題,需要進行優(yōu)化下

第一,清理下堆積的隊列,正常情況發(fā)送后會自動刪除,直接清空表mantis_email_mantis里面數(shù)據(jù)

mysql> select *  from mantis_email_mantis;

Empty set (0.00 sec)

第二,修改下配置文件

vim config/config_inc.php

修改$g_email_send_using_cronjob = ON;

第三,需要加個crontab加速發(fā)郵件的速度

crontab -e

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

第四,沒了

試下,應該可以起飛了

注:第一次寫博客,請多關照

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。

AI