Tracking bugs with Bugzilla on Linux

Source: Internet
Author: User
Tags bug tracking system perl script
Article Title: Use Bugzilla on Linux to track bugs. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
For those responsible for providing support, keeping track of problems, difficulties, and revisions may be a tough task. However, there is a perfect open-source solution that can meet this requirement: bugzilla. After installing it, you can easily track bugs and be notified of specific problems and solutions. In Linux? Step-by-step guide for installing Bugzilla on the system.
  
Bugzilla is a defect or bug tracking system that allows individual or team developers to track bugs highlighted in their products. This type of system allows users to track bugs and code modifications, communicate with other teammates, submit and review revisions to ensure quality.
  
Bugzilla is very famous in the developer community because:
-It is a fully functional (full-featured) implementation.
-It is actively supported by the developer community and is often actively updated by many users who use it throughout the day.
-It is open-source.
-It is free.
  
Many organizations are using Bugzilla, including IBM and IBM's Linux Technology Center. You can add the bug-and-solution tracking tool to your Linux system according to the Bugzilla installation instructions in this article.
  
   Prerequisites for Installation
  
The latest stable version of Bugzilla is 2.18rc3, which requires that the following software versions have been installed on your Linux system (see references ):
-The Perl version 5.6.0 or later must include the following Perl module version:
-AppConfig 1.52:
-CGI 2.93:
-Data: Dumper, any version
-Date: Format 2.21
-DBI 1.36
-DBD: mysql 2.1010
-File: Spec 0.82
-File: Temp, any version
-Template 2.08:
-Text: Wrap 2001.0131.
-MySQL version 3.23.41 or later.
-An HTTP Web server, preferably Apache or IBM_HTTP server (I will use Apache here ).
-A mail Transmission proxy, such as Sendmail 8.7 or a later version.
  
If you are not sure whether the correct Perl and MySQL software versions and Apache have been installed, you can check the software packages as follows:
-For Perl, enter $ perl-v.
-For MySQL, enter $ mysql-V.
  
To check the Web server version, you can access the Web server test page as follows:
  
Http: // your-machine-name/
  
The Web server test page provides you with all the basic information about the server. This is an excellent indication that you have correctly installed the server!
  
As this article only describes how to install Bugzilla, assume that you already have available Perl, MySQL, Apache, and sendmail, or you can install them. (If you need them, see references .)
  
   Start Installation
  
Time shortage?
If you are busy, you can refer to this list to install Bugzilla. (This list provides a link to the appropriate code area for your reference .)
1. Get the latest tarball from the Bugzilla website.
2. decompress the Bugzilla tarball.
3. Install the appropriate Perl module.
4. Obtain the correct Perl module from CPAN if necessary.
5. If Step 4 is required, return and execute step 3 again to confirm that the Perl module is correct.
6. Create a localconfig file in the bugzilla directory.
7. Configure the localconfig file to access the MySQL database.
8. Connect to the MySQL instance.
9. Create a database account for Bugzilla.
10. Run the Perl Module Settings check again.
11. Edit the configuration file of the HTTP server.
12. Visit the Bugzilla page and use the Administrator account/password created by the checksetup. pl Perl script to log on.
13 completed.
  
First, visit the Bugzilla Web site (see the link in the references section) to download the latest tarball of the application. Put the tarball in a directory accessible to Web Server users. In this example, because you are using the Apache Web server, you need to download the tarball to the default directory of Apache. Most of Apache's basic installations allow "apache" users to access the/var/www/html/directory.
  
Check the Apache installation file to make sure that the tarball is in a accessible directory. You can modify it as needed in any case.
  
Unlock Bugzilla
Listing 1 shows how to extract all the Bugzilla files to a directory named bugzilla-2.1.8rc3. For simplicity, you can use the move command shown to rename the directory to "bugzilla ".
Listing 1. Decompress Bugzilla tarball
  
$ Cd/var/www/html/
$ Tar zxvf bugzilla-2.18rc3.tgz
$ Mv bugzilla-2.18rc3/bugzilla/
  
Install the Perl Module
The Perl script in Listing 2 checks whether the required Perl module is installed on your system. It also determines whether you have an optional Perl module that supports features such as graphs and reports.
List 2. Install the Perl Module
  
$ Su root
$./Checksetup. pl
  
After this script is run, it will tell you which modules are needed and the corresponding CPAN commands required to install them from the CPAN repository. The command is similar to the following command: $ perl-MCPAN-e 'Install ""'. Run this command for each Perl module to be installed. If you have already connected to the Internet, the required modules are automatically downloaded and installed.
  
After installing all required modules, run the checksetup. pl script again. If everything works properly, you should see the output that indicates that all the required Perl modules have been installed.
  
Configure Bugzilla
This script creates a localconfig file in the bugzilla directory (as shown in listing 3 ).
Listing 3. Bugzilla Configuration
  
$ Vi localconfig
  
Configure the Bugzilla application to use your local database server. This command will only open this file in the vi editor. Here, you only need to modify a value in this file, that is, the $ db_pass field, which is the password used by the MySQL account of bugzilla (you will create it soon. If you have more than one "Custom" MySQL installation, you should check all $ db settings because they correspond to host names, communication ports, and so on.
  
Create a database account for Bugzilla
Then, you need to create a MySQL database for Bugzilla. Connect to the MySQL database instance and run the following command:
Listing 4. Add a Bugzilla MySQL account (Version 4.0 or later)
  
Mysql> grant select, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, lock tables,
Create temporary tables, DROP, references on bugs. * TO bugs @ localhost
Identified by '$ db_pass ';
Mysql> flush privileges;
  
This command creates a bugs user and grants the user account the multi-level access permission for local connection to the "bugs" database. If you want to connect to a remote database or use any other custom configuration, you can refer to the MySQL Administration documentation (see references) for similar commands.
  
Check those Perl modules again
To ensure that you have installed the required modules again, re-run the checksetup. pl script in the Bugzilla directory (listing 5 ). Now it detects that localconfig has been modified and starts the user interface editing process. Then, use the account specified in the localconfig file to create a "bugs" database and create necessary tables in the database.
Listing 5. re-run checksetup. pl in the Bugzilla directory
  
$./Checksetup. pl
  
Finally, you will be asked how to configure the Administrator account of Bugzilla.
  
   Edit HTTP server configurations
  
In most basic Apache installations, the httpd. conf file is located in the/etc/httpd/conf/directory. Check your installation to open the Apache configuration file from the correct directory. Run the following command to open it: $ vi/etc/httpd/conf/httpd. conf.
  
You need to edit some lines in this file so that Apache can use Bugzilla. First, you must allow Apache to run cgi scripts outside the CGI-bin directory. To do this, you must add (or remove comments) the following line in httpd. conf: AddHandler cgi-script. cgi.
  
Then, you must allow the Bugzilla. cgi file to run in the Bugzilla directory. Add the following two lines to the indicator:
......
Options ExecCGI FollowSymLinks <---- add this line.
AllowOverride Limit <---- add this line.
  
In the last step, add the following content to httpd. at the end of the line DirectoryIndex in conf, you must configure Apache to find the index when you enter the Bugzilla directory. cgi File: DirectoryIndex index.html. var index. cgi.
  
That's it! Now you should be able to access the http: // bugzilla Bugzilla page. Remember to use the Administrator account/password created by using the checksetup. pl Perl script before this article to log on.
  
   Conclusion
  
With the newly installed Bugzilla, you can create and configure many other features. I encourage you to study various features of Bugzilla and point out how you want to use them (I plan to use the Bugzilla server as a way to track numerous problems in our department ). As a code version system, or as a problem-ticketing system, Bugzilla is sufficient to meet your business needs.
  
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.