在debian下配置bugzilla - 测试 - 萧 蔷

来源:百度文库 编辑:神马文学网 时间:2024/04/29 04:58:57
在debian下配置bugzilla作者:lxq007
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就可以进入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
从系统安全来讲,这是很危险的。用如下命令修改root的password。 #mysqladmin -u root password "xxxxxx"
用root进入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为“ ”的用户存在。或root在server1上的password为空。可通过如下操作消除 这些隐患。
删除“ ”用户。
mysql>delete from user where user="";

修改bugzilla的密码
mysql>update user set password=password('bugzilla') where user='bugzilla';
mysql 数据库授权表中重新装载权限。  mysql>FLUSH PRIVILEGES;
退出数据库 mysql>exit
2.配置apache2
1.在apache2下创建一个文件
# vi /etc/apache2/conf.d/bugzilla
并在/etc/apache2/conf.d/bugzilla里输入
Alias /bugzilla/ "/var/www/bugzilla/"
重启apache2
#/etc/init.d/apache2 restart
3.修改bugzilla配置文件
打开配置文件,修改bugzilla用户密码为“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
有时如果不执行这条脚本进行检查的话,通过IE访问仍然访问不了
4.访问bugzilla页面
http://192.168.1.61/cgi-bin/bugzilla/index.cgi
有时这个页面虽然可以访问,但会登录不上,所以从下面这个页面进行登录
http://192.168.1.57/cgi-bin/bugzilla/index.cgi?GoAheadAndLogIn=1
作者:lxq007