Chinaunix首页 | 论坛 | 博客
  • 博客访问: 580092
  • 博文数量: 142
  • 博客积分: 10016
  • 博客等级: 上将
  • 技术积分: 1835
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-10 14:30
个人简介

工作中~

文章分类

全部博文(142)

文章存档

2009年(25)

2008年(117)

我的朋友

分类: LINUX

2008-09-12 13:22:09

作者: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页面
     
     有时这个页面虽然可以访问,但会登录不上,所以从下面这个页面进行登录
     
                                                         作者:lxq007




阅读(1105) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~