Linux 安裝 MantisBT 詳解

https://www.cnblogs.com/qdwyg2013/p/6030157.htmlphp

在工做中,選用了MantisBT做爲公司的BTS工具。MantisBT的做爲一款缺陷跟蹤管理系統,有如下優勢:html

  • 開源、 免費;mysql

  • 可與開源的testlink集成,便於統計bug的用例發現率;linux

  • 具備bug關聯功能;web

  • 權限設置靈活,不一樣角色有不一樣權限;sql

  • 具備郵件通知功能,每一個用戶可根據自身的工做特色只訂閱相關缺陷狀態郵件;數據庫

  • 提供多維度,多種表現形式的統計數據;apache

 

軟件環境:安全

  • CentOS 6.5 ;服務器

  • MantisBT-1.2.18 ;

  • xampp-linux-x64-5.6.3 ;

注:xampp能快速搭建LAMP環境,提升部署效率。

1.   xampp環境搭建

1.1.  下載xampp安裝包

[root@iserver1 tmp]#

執行命令:

wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/5.6.3/xampp-linux-x64-5.6.3-0-installer.run

執行過程:

http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/5.6.3/xampp-linux-x64-5.6.3-0-installer.run

Resolving sourceforge.net...  216.34.181.60

Connecting to  sourceforge.net|216.34.181.60|:80... connected.

。。。。。。。

Connecting to  jaist.dl.sourceforge.net|150.65.7.130|:80... connected.

HTTP request sent, awaiting response...  200 OK

Length: 128831805 (123M)  [application/x-makeself]

Saving to:  「xampp-linux-x64-5.6.3-0-installer.run」

100%[=============================================================================================================================>]  128,831,805 4.06M/s   in 26s    

2015-01-27 21:49:31 (4.71 MB/s) -  「xampp-linux-x64-5.6.3-0-installer.run」 saved [128831805/128831805] 

1.2.  安裝xampp

[root@iserver1 tmp]#

執行命令:

chmod +x  xampp-linux-x64-5.6.3-0-installer.run

./xampp-linux-x64-5.6.3-0-installer.run

執行過程,交互的過程如粗體部分。

----------------------------------------------------------------------------

Welcome to the XAMPP Setup Wizard.

----------------------------------------------------------------------------

Select the components you want to  install; clear the components you do not want

to install. Click Next when you are  ready to continue.

 

XAMPP Core Files : Y (Cannot be edited)

XAMPP Developer Files [Y/n] :y

Is the selection above correct? [Y/n]: y

 ----------------------------------------------------------------------------

Installation Directory

 XAMPP will be installed to /opt/lampp

Press [Enter] to continue:

 ----------------------------------------------------------------------------

Setup is now ready to begin installing  XAMPP on your computer.

Do you want to continue? [Y/n]: y

 ----------------------------------------------------------------------------

Please wait while Setup installs XAMPP  on your computer.

 Installing

 0% ______________ 50% ______________ 100%

 #########################################

 ----------------------------------------------------------------------------

Setup has finished installing XAMPP on  your computer.


1.3.  配置xmapp安全策略

[root@iserver1 htdocs]#

執行命令:

/opt/lampp/xampp security

執行內容, 交互的過程如粗體部分。

XAMPP:   Quick security check...

XAMPP:   Your XAMPP pages are NOT secured by a password.

XAMPP: Do you want to set a password?  [yes] yes

XAMPP: Password: XXXXX

XAMPP: Password (again):

XAMPP:   Password protection active. Please use 'xampp' as user name!

XAMPP:   MySQL is accessable via network.

XAMPP: Normaly that's not recommended.  Do you want me to turn it off? [yes] y

XAMPP:   Turned off.

XAMPP:   MySQL has to run before I can check the security.

XAMPP:   MySQL has to run before I can check the security.

XAMPP:   MySQL has a root passwort set. Fine! :)

XAMPP:   The FTP password for user 'daemon' is still set to 'xampp'.

XAMPP: Do you want to change the  password? [yes] yes

XAMPP: Password: XXXXX

XAMPP: Password (again):

XAMPP: Reload ProFTPD...not running.

XAMPP:   Done.

    至此,LAMP環境搭建完成。

1.4.  運維xampp

1. 設置xampp開機自啓,執行如下命令:

ln -s /opt/lampp/lampp  /etc/rc.d/rc3.d/S99lampp

ln -s /opt/lampp/lampp  /etc/rc.d/rc4.d/S99lampp

ln -s /opt/lampp/lampp  /etc/rc.d/rc5.d/S99lampp

2. 查看xampp運行狀態

 [root@localhost ~]# /opt/lampp/lampp start           #啓動lampp

 [root@localhost ~]# /opt/lampp/lampp stop           #中止lampp

 [root@localhost htdocs]# /opt/lampp/lampp  restart    #重啓lampp

 [root@localhost ~]# /opt/lampp/lampp status          #查看狀態

 

2.   安裝部署mantisbt

2.1.  安裝mantisbt

2.1.1.   下載mantisbt

1.  cd /tmp

2.  執行命令,獲取mantisbt的安裝包:

wget http://sourceforge.net/projects/mantisbt/files/mantis-stable/1.2.18/mantisbt-1.2.18.tar.gz

3.  解壓mantisbt的壓縮包,執行命令

tar –zxvf mantisbt-1.2.18.tar.gz

 

2.1.2.   部署mantisbt

1.  執行命令

mv /tmp/mantisbt-1.2.18 /opt/lampp/htdocs/


2.1.3.   建立mantisbt的數據庫

1.  訪問http://serverIP/mantisbt/index.php,自動跳轉到http://serverIP/mantisbt/admin/install.php頁面,在該頁面創建mantisbt的數據庫;

2.  在如下頁面,root的密碼爲「xx」,直接點擊「INSTALL/update database」便可。

wKiom1nMk9yxc4RdAAD6J3zd-vw091.jpg

3.  數據庫建立成功,經過http://serverIP/phpmyadmin/,可查看bugtracker數據庫的建立狀況。

wKiom1nMlEHyYwd5AAFDUgiydOE256.jpg

2.2.  配置mantisbt

2.2.1.   配置數據庫鏈接

1.      [root@localhost mantisbt]#

執行如下命令:

vi config_inc.php

修改數據庫鏈接信息

<?php

     $g_hostname = 'localhost';

     $g_db_type = 'mysql';

     $g_database_name = 'xx'; #填寫設置的數據名稱,與2.1.3章節中填寫的Database Name一致

     $g_db_username = 'xx';   #填寫數據庫用戶名

     $g_db_password = 'xx';   #填寫數據庫密碼

?>

2.      [root@localhost mantisbt]#

執行如下命令:

cp config_inc.php.sample  config_inc.php


2.2.2.   Mantisbt漢化

1.      執行命令:

vi  /opt/lampp/htdocs/mantisbt/config_defaults_inc.php

修改:$g_default_language,  將english  改成chinese_simplified

2.      在我的資料內,點擊:更改我的設置,選擇界面語言:chinese_simplified

3.      界面更新爲中文版

wKiom1nMlLPyt5H2AADDoe7SmR4447.jpg

2.2.3.   設置時區

1.      執行命令:

vi /opt/lampp/htdocs/mantisbt/config_defaults_inc.php

修改成   $g_default_timezone = 'Asia/Shanghai';

2.      在我的資料內,點擊:更改我的設置,選擇時區:shanghai

2.2.4.   配置mantis郵件

1.      執行命令

vi /opt/lampp/htdocs/mantisbt/  config_inc.ini

修改郵件配置信息

# --- Email Configuration ---

$g_phpMailer_method             =  PHPMAILER_METHOD_SMTP; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL

$g_smtp_host   =  'smtp.ym.163.com';        #  used with PHPMAILER_METHOD_SMTP

$g_smtp_username  =  'mantisbt.admin@xxx.com';    # used  with PHPMAILER_METHOD_SMTP

$g_smtp_password                =  'xxxx';       # used with  PHPMAILER_METHOD_SMTP

$g_administrator_email  =  'mantisbt.admin@xxx.com';

$g_webmaster_email      =  'mantisbt.admin@xxx.com';

$g_from_email           =  'mantisbt.admin@xxx.com';        #  the "From: " field in emails

$g_return_path_email    =  'mantisbt.admin@xxx.com';  # the  return address for bounced mail

# $g_from_name                  =  'Mantis Bug Tracker';

# $g_email_receive_own  = OFF;

# $g_email_send_using_cronjob = OFF;

     測試新用戶註冊,給管理員發送郵件成功。

 

    至此,MantisBT的安裝部署已經完成。

 

 

另附:

linux下用xampp安裝php集成環境,並修改各自端口號

http://blog.51cto.com/2338053/1969446

一:安裝xampp

1.到官網下載linux版xampp    https://www.apachefriends.org/zh_cn/index.html

下載後爲:xampp-linux-x64-5.6.24-1-installer.run

2.將下載的xampp的安裝文件放到linux系統對應目錄中,並切換到文件的存放目錄。

輸入命令:ls查看文件是否存在,接着輸入安裝命令,如圖所示進行安裝

注意:先修改文件xampp-linux-x64-5.6.24-1-installer.run的權限,不然沒法運行安裝

直到進度條走完,顯示安裝完成,進入安裝目錄,因爲上面默認安裝,安裝目錄在/opt/lampp下,咱們打開看看

運行命令/opt/lampp/lampp start 啓動web服務器,從圖中能夠看到apache、mysql、ftp服務都啓動OK了

啓動:./lampp start

重啓:./lampp restart

中止:./lampp stop

二:解決端口號佔用問題

安裝完成後啓動時可能會遇到端口號佔用,1-4根據本身啓動時報錯決定是否修改,若1-4有修改的,5必須修改

1. Another web server is already running

說明apache端口號被佔用

進入/opt/lampp/etc目錄下,找到文件httpd.conf,此文件中有兩個地方須要修改

a.找到Listen行修改,如:1211

b.找到ServerName行修改,如:10.0.0.251:1211

 

2. Another web server with SSL is already running

說明SSL端口號被佔用

進入/opt/lampp/etc/extra目錄下,找到文件httpd-ssl.conf,此文件中有三個地方須要修改

a.找到Listen行修改,如:1212

b.找到ServerName行修改,如:10.0.0.251:1212

c.找到節點VirtualHost行修改,如:_default_:1212

 

3. Another MySQL daemon is already running

說明MySQL端口號被佔用

進入/opt/lampp/etc目錄下,找到文件my.cnf,此文件中有兩個地方須要修改

a.分別找到port行修改,如:1213

 

4. Another FTP daemon is already running

說明FTP端口號被佔用

進入/opt/lampp/etc目錄下,找到文件proftpd.conf,此文件中有一個地方須要修改

a.找到Port行修改,如:1214

 

5.修改完上面各自的配置文件端口號後,再修改xampp中的配置端口號

進入/opt/lampp目錄下,找到文件xampp,此文件中有四個地方須要修改
找到testport,總共有四個,分別對應apache、SSL、MySql、FTP的端口號根據上面修改的端口號,對應修改此配置文件中的端口號(上面沒有修改的端口,則對應的不須要改動)

修改完以後從新啓動就ok了

相關文章
相關標籤/搜索