在debian下配置bugzilla
來(lái)源:ChinaUnix博客 日期:2008.09.12 13:22 (共有
0條評論)
我要評論 debian下安裝配置bugzilla
一.安裝所需要的軟件包
1.安裝mysql
#aptitude install mysql-server-5.0
2.安裝apache2
#aptitude install apache2
3.安裝bugzilla
#aptitude install bugzilla
二.配置 1.配置mysql
數據庫安裝后,root的password是空的。鍵入如下命令,不用password就可以進(jìn)入mysql
#mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.0.32-Debian_7etch6-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>exit
從系統安全來(lái)講,這是很危險的。用如下命令修改root的password。#mysqladmin -u root password"xxxxxx" 用root進(jìn)入mysql。#mysql -u root -pxxxxxx 查看版本#mysql -V --------------------------------------------- 查看數據庫
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| bugzilla |
| mysql |
+--------------------+
3 rows in set (0.00 sec)
顯示數據庫的表。選擇數據庫。mysql>use mysql;
顯示數據庫的表。mysql> select host,user,password from user;
+-----------+------------------+-------------------------------------------+
| host | user | password |
+-----------+------------------+-------------------------------------------+
| localhost | root | |
| root | root | |
| localhost | debian-sys-maint | *2DA6F8F346D49553AA43B01EC2656FB363BD6692 |
| localhost | bugzilla | *E44A8B925465DD46776CACDFED90A0DEF54ECF24 |
+-----------+------------------+-------------------------------------------+
4 rows in set (0.00 sec)
(注:當表中有uesr為“ ”的用戶(hù)存在?;騬oot在server1上的password為空??赏ㄟ^(guò)如下操作消除 這些隱患?! h除“ ”用戶(hù)。mysql>delete from user where user=""; ?。?br> 修改bugzilla的密碼
mysql>update user set password=password('bugzilla') where user='bugzilla';
mysql 數據庫授權表中重新裝載權限。
mysql>FLUSH PRIVILEGES;
退出數據庫
mysql>exit
2.配置apache2
1.在apache2下創(chuàng )建一個(gè)文件
# vi /etc/apache2/conf.d/bugzilla
并在/etc/apache2/conf.d/bugzilla里輸入
Alias /bugzilla/ "/var/www/bugzilla/"
重啟apache2
#/etc/init.d/apache2 restart
3.修改bugzilla配置文件
打開(kāi)配置文件,修改bugzilla用戶(hù)密碼為“bugzilla".(在上邊數據庫中修改的)
#nano /etc/bugzilla/localconfig
#
# How to access the SQL database:
#
$db_host = "localhost"; # where is the database?
$db_port = 3306; # which port to use
$db_name = "bugzilla"; # name of the MySQL database
$db_user = "bugzilla"; # user to attach to the MySQL database
#
# Some people actually use passwords with their MySQL database ...
#
$db_pass = "bugzilla";
執行下腳步
# /usr/share/bugzilla/lib/checksetup.pl
有時(shí)如果不執行這條腳本進(jìn)行檢查的話(huà),通過(guò)IE訪(fǎng)問(wèn)仍然訪(fǎng)問(wèn)不了
4.訪(fǎng)問(wèn)bugzilla頁(yè)面
http://192.168.1.61/cgi-bin/bugzilla/index.cgi
有時(shí)這個(gè)頁(yè)面雖然可以訪(fǎng)問(wèn),但會(huì )登錄不上,所以從下面這個(gè)頁(yè)面進(jìn)行登錄
http://192.168.1.57/cgi-bin/bugzilla/index.cgi?GoAheadAndLogIn=1