现在的位置: 首页 > 综合 > 正文

linux下安装Bugzilla(二)

2013年07月01日 ⁄ 综合 ⁄ 共 2180字 ⁄ 字号 评论关闭

继续linux下安装Bugzilla(一)转载之前的

4. 数据库管理

    安装后,root的password是空的。键入如下命令,不用password就可以进入mysql

  #mysql  

  Welcome to the MySQL monitor. Commands end with ; or \g.

  Your MySQL connection id is 2 to server version: 5.0.22

  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>use mysql;

    显示数据库的表。

  mysql>select host,user,password from user;

  +-----------+------+------------------+

  | host | user | password |

  +-----------+------+------------------+

  | localhost | root | xxxxxxxxxxxxxxxx |

  | server1 | root | |

  | server1 | | |

  | localhost | | |

  +-----------+------+------------------+

  4 rows in set (0.00 sec)

    从以上显示可以看到,名字为“”的用户存在。还有,root在server1上的password为空。可通过如下操作消除这些隐患。

    删除“”用户。

mysql>delete from user where user="";

    设置root在server1上的password。

mysql>update user set password=password('xxxxxx') where host='server1';

    确认操作后的user表。

  mysql>select host,user,password from user;

  +-----------+------+------------------+

  | host | user | password |

  +-----------+------+------------------+

  | localhost | root | xxxxxxxxxxxxxxxx |

  | server1 | root | xxxxxxxxxxxxxxxx |

  +-----------+------+------------------+   

  2 rows in set (0.00 sec)

  创建数据库bugs

  create database bugs;

  show databases;

  use bugs;

  创建用户bugs

GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE, LOCK TABLES,DROP,REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '123456';

  从 mysql 数据库授权表中重新装载权限。

  FLUSH PRIVILEGES;

  退出数据库

exit;

  二、安装bugzilla

   1、解包:tar zxvf bugzilla-2.20.4.tar.gz

   2、配置:mkdir /var/www/html/bugzilla   (创建bugzilla目录)

   cd bugzilla-2.20.4    然后   

   mv * /var/www/html/bugzilla   (移动bugzilla文件到apache服务目录)

  chmod -R 777 /var/www/html/bugzilla

三、配置启动acpache

  httpd -v

  # vi /etc/httpd/conf/httpd.conf(修改ServerName这行后面部分为本机IP地址,如: ServerName 192.168.1.105:80)

  # /usr/sbin/apachectl start (启动acpache)

  测试APACHE2是否服务启动成功

  打开IE输入:

   http://ip

  四、安装perl模块

  由于默认的perl安装包缺少一些bugzilla需要的模块,所以需要补充一些模块,最好是在线进行,不要一个一个的自己安装。以root身份运行在联网情况下用以下命令安装所需的最少perl模块:

  perl -MCPAN -e 'install "Bundle::Bugzilla"'

  Are you ready for manual configuration? [yes] no

  of modules we are processing right now? [yes] 敲回车,以后都敲回车!

 

抱歉!评论已关闭.