天天看點

How to install and configure bugzilla[The Bugzilla Guide - 2.20.1 Release]

How to install and configure bugzilla

[Precondition]

OS     : Redhat Fedora 2

Apache : 2.0

Mysql  : 5.0.19

Perl   : v5.8.3

[How to install bugzilla]

1) Download and extract bugzilla’s tar.gz file.

2) Run checksetup.pl to find lost perl modules and install them until no any errors.

3) Edit localconfig file and modify ‘$db_pass’ entry which will be used when logging in mysql server. The entries of ‘$db_host’, ‘$db_name’, ‘$db_user’ and ‘$db_sock’ are optional to be changed if it is necessary.

4) Run checksetup.pl again, and enter user_name and password of administrator that will be used when loging in bugzilla. To pay attention that user_name should be available email address if administrator wants to put an eye on events. If you meet like ‘Cannot connect ‘bugs’ database’ error, please check whether there is database whose name is bugs. If it has not existed, please see following tips to create it. If password is not correct, please check whether ‘CapsLock’ is on

How to install and configure bugzilla[The Bugzilla Guide - 2.20.1 Release]

, otherwise, please convert password with the help of last tip.

5) Create administrator of mysql and grant operations for bugs database.

I) If you are using MySQL 4.0 or newer, enter:

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO [email protected] IDENTIFIED BY ’$db_pass’;

mysql> FLUSH PRIVILEGES;

II) If you are using an older version of MySQL,the LOCK TABLES and CREATE TEMPORARY TABLES permissions will be unavailable and should be removed from the permissions list. In this case, the following command line can be used:

mysql> GRANT SELECT, INSERT,

UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, REFERENCES ON bugs.* TO [email protected] IDENTIFIED BY ’$db_pass’;

mysql> FLUSH PRIVILEGES;

6) Start apache server if it has not be started. For example:

   #service –-status-all | egrep ‘httpd’

httpd (pid 2487 2486 2485 2484 2483 2482 2478 2477 2377) is running...

In this case, it means that apache has been running. Otherwise, please use #service httpd start to start apache server. After starting apache server, you had better browser to confirm whether it can access the home page of apacher. Please input http://your_ip_address. if relative home page is shown, congratulate! It is OK! Or else check apache server

How to install and configure bugzilla[The Bugzilla Guide - 2.20.1 Release]

.

7) Use ‘ln’ command to link bugzilla-2.22rc1 into apache root directory. The path of ‘/var/www/html’ is root directory of apache server in my linux server, and bugzilla is its subpage.

#cd /var/www/html

#ln –s /usr/local/bugzilla-2.22rc1 ./bugzilla

8) Edit configuration file of apache server. It is located at /etc/httpd/conf/http.conf in my linux server. Please open http.conf and append

<Directory /var/www/html/bugzilla>

    AddHandler cgi-script .cgi

    Options +Indexes +ExecCGI +FollowSymLinks

    DirectoryIndex index.cgi

    AllowOverride Limit

</Directory>

into this file. Because we use ‘ln’ to link bugzilla to /usr/local/bugziall-2.22rc1, so FollowSynLinks must be added into ‘Directory’ range.

9) Restart apache server to check whether browser can log in bugzilla home page.

#service httpd restart

Please input http://your_ip_address/bugzilla to check. If home page of bugzilla can be displayed correctly, installation has finished.

10) Log in bugzilla using user_name and password of administrator. The user_name must include whole email address. For example: [email protected]. If browser occurs some errors, such as XXXXX.cgi has not existed, you had better directly log in http://your_ip_address/bugzilla/editparams.cgi and log in again. After logging in editparams page, please modify urlbase’s value. For example: http://your_ip_address/bugzilla.

[How to configure bugzilla]

Please visit http://www.bugzilla.org/docs/ to find the relative docs and follow them. It is very simply, and I will not expend it in details. If you have met troubles in configuring ‘sendmail’ to send emails, please visit http://blog.csdn.net/hello_wyq/archive/2006/04/06/652871.aspx, it will help you more

How to install and configure bugzilla[The Bugzilla Guide - 2.20.1 Release]

.

[TIPS]

Where can I download it?

The latest available release-version of bugzilla is Bugzilla 2.22rc1 which is located http://www.bugzilla.org/download/#v222. You visit and download this file: bugzilla-2.22rc1.tar.gz.

How to extract and locate?

#cp your_download_dir/ bugzilla-2.22rc1.tar.gz /usr/local

#tar xvzf bugzilla-2.22rc1.tar.gz

#rm bugzilla-2.22rc1.tar.gz

How to check essential perl modules?

We can use bugzilla’s ‘checksetup.pl’ script to check what modules are necessary for bugzilla to install. For example, I run checksetup.pl with the argument of –check-modules in my linux server. All relative modules will be checked and result will be shown followed this command. Optional modules may have not been installed before installing bugzilla, but others must be installed firstly.

#cd /usr/local/bugzilla-2.22rc1
        
#./checksetup.pl --check-modules
        
Checking perl modules ...
        
Checking for       AppConfig (v1.52)    not found
        
Checking for             CGI (v2.93)   ok: found v3.01
        
Checking for    Data::Dumper (any)     ok: found v2.121
        
Checking for    Date::Format (v2.21)   ok: found v2.22
        
Checking for             DBI (v1.38)   ok: found v1.40
        
Checking for      File::Spec (v0.84)   ok: found v0.87
        
Checking for      File::Temp (any)     ok: found v0.14
        
Checking for        Template (v2.08)    not found
        
Checking for      Text::Wrap (v2001.0131) ok: found v2001.09291
        
Checking for    Mail::Mailer (v1.67)    not found
        
Checking for    MIME::Base64 (v3.01)    found v2.21
        
Checking for    MIME::Parser (v5.406)   not found
        
Checking for        Storable (any)     ok: found v2.09
        
The following Perl modules are optional:
        
Checking for              GD (v1.20)    not found
        
Checking for     Chart::Base (v1.0)     not found
        
Checking for       XML::Twig (any)     ok: found v3.13
        
Checking for       GD::Graph (any)      not found
        
Checking for GD::Text::Align (any)      not found
        
Checking for     PatchReader (v0.9.4)   not found
        
Checking for   Image::Magick (any)     ok: found v5.5.7
        
If you you want to see graphical bug charts (plotting historical 
data overtime), you should install libgd and the following Perl modules:
        
GD:          /usr/bin/perl -MCPAN -e 'install "GD"'
        
Chart:       /usr/bin/perl -MCPAN -e 'install "Chart::Base"'
        
If you you want to see graphical bug reports (bar, pie and line 
charts of current data), you should install libgd and the following 
Perl modules:
        
GD:              /usr/bin/perl -MCPAN -e 'install "GD"'
        
GD::Graph:       /usr/bin/perl -MCPAN -e 'install "GD::Graph"'
        
GD::Text::Align: /usr/bin/perl -MCPAN -e 'install "GD::Text::Align"'
        
If you want to see pretty HTML views of patches, you should install the
        
PatchReader module:
        
PatchReader: /usr/bin/perl -MCPAN -e 'install "PatchReader"'
        
Bugzilla requires some Perl modules which are either missing from
        
your system, or the version on your system is too old.
        
They can be installed by running (as root) the following:
        
   /usr/bin/perl -MCPAN -e 'install "MIME::Parser"'
        
   Minimum version required: 5.406
        
   /usr/bin/perl -MCPAN -e 'install "Mail::Mailer"'
        
   Minimum version required: 1.67
        
   /usr/bin/perl -MCPAN -e 'install "MIME::Base64"'
        
   Minimum version required: 3.01
        
   /usr/bin/perl -MCPAN -e 'install "AppConfig"'
        
   Minimum version required: 1.52
        
   /usr/bin/perl -MCPAN -e 'install "Template"'
        
   Minimum version required: 2.08
        

Above all, you had better run this perl script in your linux server and find out all necessary modules and install them one by one.

How to install essential perl modules?

As the result of running checksetup.pl, we can easily make use of cpan command to install relative perl modules if linux server can access Internet. For example,

#perl -MCPAN -e 'install "MIME::Parser"'

Following the prompt of cpan, it eases to install respective modules. So here, I will not explain it in details. I will focus on the secondary way to install perl module.

When linux server can not access Internet, we must download all relative modules manually. It is a very heavy and boring job. In fact, I have done it at one time.

1) Download perl module from http://www.cpan.org/.

2) Extract it into proper directory

#tar xvzf your_perl_module.tar.gz

3) Generate Makefile, if there are some errors when running perl Makefile.PL, the unfound perl modules must be installed before it.

#cd your_perl_module

#perl Makefile.PL

4) Make

#make

5) Test whether it is OK

#make test

6) Install perl module

#make install

How to add administrator of mysql?

#mysqladmin –u root password ‘new_password’

How to delete anonymous account?

# mysql -u root -p

Enter password:

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

Your MySQL connection id is 7 to server version: 5.0.19-standard-log

Type 'help;' or '/h' for help. Type '/c' to clear the buffer.

mysql> USE mysql;

Database changed

mysql> DELETE FROM user WHERE Password='';

Query OK, 3 rows affected (0.02 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.02 sec)

mysql> quit;

Bye

The above operations will delete any anonymous accounts from mysql database.

How to create database?

# mysql -u root -p

Enter password:

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

Your MySQL connection id is 11 to server version: 5.0.19-standard-log

Type 'help;' or '/h' for help. Type '/c' to clear the buffer.

mysql> CREATE DATABASE temp;

Query OK, 1 row affected (0.07 sec)

mysql> SHOW DATABASES;

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

| Database           |

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

| information_schema |

| bugs               |

| mysql              |

| temp               |

| test               |

| tmp                |

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

6 rows in set (0.00 sec)

mysql> quit;

Bye

The above operation will create ‘temp’ database. We show all data by ‘SHOW DATABASE’ command in the mysql.

How to delete database?

# mysql -u root -p

Enter password:

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

Your MySQL connection id is 15 to server version: 5.0.19-standard-log

Type 'help;' or '/h' for help. Type '/c' to clear the buffer.

mysql> DROP temp;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'temp' at line 1

mysql> DROP DATABASE temp;

Query OK, 0 rows affected (0.05 sec)

mysql> SHOW DATABASES;

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

| Database           |

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

| information_schema |

| bugs               |

| mysql              |

| test               |

| tmp                |

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

5 rows in set (0.00 sec)

mysql> QUIT

Bye

You have new mail in /var/spool/mail/root

The Above operations will delete ‘temp’ database from mysql, and all relative data will be lost, so please be careful!

How to convert password between from lower version to higher version of mysql?

mysql>SET password for [email protected]"localhost"=old_password('your_password');
        

[The Bugzilla Guide - 2.20.1 Release]

     http://www.bugzilla.org/docs/2.22/html/