Install Bugzilla on CentOS/RHEL Linux 7

    Bugzilla is a free and open source web-based bug tracker and testing software tool developed by the Mozilla Foundation. It is written in Perl, and uses MySQL as its database back-end. Key features of Bugzilla are listed below:

    1. Email integration capability.
    2. Optimized, well-structured and secure system.
    3. Easily remember your searches using advanced query tool.
    4. Easily edit user profiles.
    5. Comprehensive permission based system.

    # sudo yum update -y

    Install LAMP

    Let us install the Apache web server, MariaDB, and other required packages on the system.

    You can install all of them by running the following command:

    # sudo yum install httpd mariadb mariadb-server httpd-devel mod_ssl mod_ssl mod_perl mod_perl-devel mariadb-devel php-mysql gcc gcc-c++ graphviz graphviz-devel patchutils gd gd-devel wget perl* -y

    Once all the packages are installed including their dependencies, start the Apache and MariaDB services and enable them to start on boot with the following commands:

    # sudo systemctl start httpd

    # sudo systemctl start mariadb

    # sudo systemctl enable httpd

    # sudo systemctl enable mariadb

    Configure MariaDB Database

    Our MariaDB installation needs to be secured. To do so, run the mysql_secure_installation script:

    # sudo mysql_secure_installation

    # mysql -u root –p

    Enter the root password when asked, then create a new database for Bugzilla:

    MariaDB [(none)]> CREATE DATABASE bugzilla;

    Create a database user and password for Bugzilla:

    MariaDB [(none)]>CREATE USER bugs@’localhost’ IDENTIFIED BY ‘Password’;

    MariaDB [(none)]>GRANT ALL PRIVILEGES ON bugzilla.* TO ‘bugs’@’localhost’ IDENTIFIED BY ‘Password’ WITH GRANT OPTION;

    MariaDB [(none)]>FLUSH PRIVILEGES;

    MariaDB [(none)]>exit;

    Make a soft where we download or copy the setup

    # mkdir dir

    Give permission to the folder

    # chmod 777 dir/

    # cd /dir/

    Once you are done, you can proceed to install Bugzilla.

    Install Bugzilla

    You can download the latest version of the Bugzilla with the wget command:

    # wget http://ftp.mozilla.org/pub/webtools/bugzilla-5.0.tar.gz

    Once the download is complete, extract the downloaded archive with the tar command:

    # tar -xvzf bugzilla-5.0.tar.gz

    Move the extracted directory into the Apache web root directory:

    # sudo mv bugzilla-5.0 /var/www/html/Bugzilla

    Set proper permissions on the bugzilla directory:

    # sudo chown -R apache:apache /var/www/html/Bugzilla

    You will also need to install all necessary Perl modules in your system.

    Change into the bugzilla directory:

    # cd /var/www/html/bugzilla/

    Install all the required Perl modules with the following command:

    # sudo /usr/bin/perl install-module.pl –all

    Now, Run

    ./checksetup.pl

    Prompt to edit

    Please edit the file ./localconfig and then re-run checksetup.pl

    you will need to edit localconfig file:

    # vi /var/www/html/Bugzilla/localconfig

    Change the file as shown below:

    $db_host = ‘localhost’;

    $db_name = ‘bugzilla’;

    $db_user = ‘bugs’;

    $db_pass = ‘Password’;

    Save and close the file when you are finished.

    Run the checksetup.pl perl script to install Bugzilla:

    # sudo ./checksetup.pl

    “Enter the e-mail address of the administrator: krishan.bir@startupfarms.com

    Enter the real name of the administrator: Krishan Bir Verma

    Enter a password for the administrator account:

    Please retype the password to verify:

    krishan.bir@startupfarms.com is now set up as an administrator.

    Creating initial dummy product ‘TestProduct’…

    Now that you have installed Bugzilla, you should visit the ‘Parameters’

    page (linked in the footer of the Administrator account) to ensure it

    is set up as you wish – this includes setting the ‘urlbase’ option to

    the correct URL.

    checksetup.pl complete.“

    Comment out a line in the .htaccess file that the Bugzilla installation script created:

    # sudo sed -i ‘s/^Options -Indexes$/#Options -Indexes/g’ ./.htaccess

    Configure Apache for Bugzilla

    Let’s create a new virtualhost directive for Bugzilla. You can do this by creating the file /etc/httpd/conf.d/bugzilla.conf:

    # vi /etc/httpd/conf.d/bugzilla.conf

    Add the following lines:

    <VirtualHost *:80>

    DocumentRoot /var/www/html/bugzilla/

    </VirtualHost>

    <Directory /var/www/html/bugzilla>

    AddHandler cgi-script .cgi

    Options +Indexes +ExecCGI

    DirectoryIndex index.cgi

    AllowOverride Limit FileInfo Indexes

    </Directory>

    Save the file and restart Apache’s httpd service for the changes to take effect:

    # sudo systemctl restart httpd

    Disable and stop Firewall

    # systemctl disable firewalld.service

    # systemctl stop firewalld.service

    Disable selinux

    # vi /etc/syscofig/selinux

    Access Bugzilla

    Once everything is setup properly, it is time to access Bugzilla.

    Open your favourite web browser and type the URL http://localhost, you should see the Bugzilla welcome page as below:

    Click on the Log In button and provide your username and password. You should see the Bugzilla Main page as below:

Click to rate this post!
[Total: 0 Average: 0]

Share and Enjoy !

Shares
Get Weekly KBV Tips !

Learn and improve day to day Knowledge & lifestyles.