CentOS安裝和配置Mantis
Mantis是一個基於PHP技術的輕量級的開源缺陷跟蹤系統,以Web操作的形式提供專案管理及缺陷Tracing Service。在功能上、實用性上足以滿足中小型項目的管理及跟蹤。更重要的是其開源,不需要負擔任何費用。
1. 安裝apache, mysql等必要軟體
1#yumupdate2#yuminstallhttpdphpphp-pdophp-mysqlphp-gdmysqlmysql-server3#chkconfigmysqldon4#servicemysqldrestart5#chkconfighttpdon6#servicehttpdrestart
2. 下載並解壓mantis
#cd/var/www/html#wgethttp://sourceforge.net/projects/mantisbt/files/mantis-stable/1.2.15/mantisbt-1.2.15.tar.gz/download#tarxvfmantisbt-1.2.15.tar.gz#mvmantisbt-1.2.15mantis#chown-Rapache:apachemantis
3. 建立資料庫
#mysql-uroot-p***>createdatabasemantis;>grantallprivilegesonmantis.*touser@localhostidentifiedby'password';>flushprivileges;>exit;#
4. 安裝mantis
在瀏覽器裡輸入http://ip/mantis,此時瀏覽器會跳轉到http://ip/mantis/admin/install.php,按照實際情況輸入hostname,databasename(即第3步裡面的mantis),username(即第3步裡面的user),password(即第3步裡面的password)。其中資料庫類型可以選擇Mysqli。
填寫好這些內容,點擊install/update database即可。
5. 配置mantis
#cd/var/www/html/mantis#rm-rfconfig_inc.php#cpconfig_inc.php.sampleconfig_inc.php#vimconfig_inc.php
主要的配置如下:
$g_hostname='localhost';#伺服器位址$g_db_username='user';#資料庫使用者$g_db_password='password';#資料庫密碼$g_database_name='mantis';#資料庫名稱$g_db_type='mysqli';#資料庫類型$g_allow_signup=ON;$g_allow_anonymous_login=OFF;$g_phpMailer_method=PHPMAILER_METHOD_SMTP;$g_smtp_host='smtp.sina.com:25';$g_smtp_username='***';#信箱使用者名,即@前面的部分$g_smtp_password='***';#郵箱密碼$g_administrator_email='***@***';$g_webmaster_email='***@***';$g_from_email='';#From欄位的值$g_return_path_email='';$g_allow_file_upload=ON;$g_file_upload_method=DISK;$g_absolute_path_default_upload_folder='/var/www/html/maintis/upload/';$g_max_file_size=100000;#單位是位元組,即100kB#以下兩個需要自己添加$g_default_language='auto';$g_fallback_language='chinese_simplified';
6. 重啟服務,刪除admin目錄
#servicehttpdrestart#servicemysqldrestart#cd/var/www/html/mantis#rm-rfadmin
這時,在瀏覽器裡輸入http://ip/mantis,就可以訪問了。