How to Install Bugzilla on CentOS 7

By Sajid Qureshi, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

Bugzilla is free and open source web-based bug tracking tool. It is developed and used by the Mozilla project. Bugzilla is widely used by various organizations to improve their software application because it allows you to track defects and code changes in your applications. You can communicate with your Dev team easily and submit and review patches using Bugzilla.

In this guide, we will show you how to install Bugzilla bug tracking system on your Alibaba Cloud Elastic Compute Service (ECS) CentOS 7 server.

Prerequisites

1. You must have an Alibaba Cloud Elastic Compute Service (ECS) instance activated and have verified your valid payment method. If you are a new user, you can get a free account in your Alibaba Cloud account. If you don’t know about how to set up your ECS instance, you can refer to this tutorialor quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
2. A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
3. A sudo user

Update System

First login to your server and upgrade all the available packages using the following command.

Next, install the EPEL repository using the following command.

Install Perl

Bugzilla requires Perl 5.14 or greater so here we will be installing perl 5.16.x with some required Perl modules using the following command.

Next, you’ll need to verify this installation using the following command and make sure it’s greater than 5.14.

Now Perl is installed successfully but you will need to install some other required dependencies. Execute the following command and it’ll do the job for you.

Install Apache and MariaDB

Before installing Bugzilla, you will need to install the Apache web server along with MariaDB to store the data.

Run the following command to install the Apache web server.

Now you can start Apache and enable it to start at boot time, using the following commands.

Next, we will need to install MariaDB for database purposes for Bugzilla. So, let’s install the latest stable release of MariaDB using the following commands. Execute the commands one by one.

Now you’ll have to start the MariaDB service and enable it to start at the boot time like we have done before for apache server, to do so please run following commands.

We recommend you make sure that this installation is secure and to do so run following command.

You’ll be asked to provide a root password so, enter an appropriate password and answer yes to all questions by pressing Y.

Now you’ll have to create a database for Bugzilla so please follow the instructions.

You’ll be asked to enter a password so simply enter a password and now execute the following queries to create a new database.

The above query will create a database named bugzilla_data. For the database, you can use any name you prefer in the place of bugzilla_data. Make sure that you use semicolon at the end of each query as a query always ends with a semicolon. Once the database is created you can create a new user and grant the required permissions to the user for the database.

The above query will create a user with username bugzilla_user. You can use any preferred username instead of bugzilla_user. Replace StrongPassword with a strong password.

Now provide the appropriate privileges to your database user over the database you have created. Run the following query to do so.

Now run the following query to immediately apply the changes to the database privileges.

Now you can exit from MariaDB prompt using the following command.

Now let’s modify the configuration file of MariaDB using any text editor. Here we are using nano text editor because its interface is more user-friendly, you can also install it using sudo yum -y install nano.

Now execute the following command to edit the configuration file.

Add the following content under the [mysqld] line:

Finally, save the file and exit from the text editor and then restart the MariaDB server using the following command.

Install Bugzilla

Once you have all the required dependencies installed, you can proceed to download and install Bugzilla on your CentOS 7 server. You can download the latest stable release of Bugzilla using the following wget command.

Next, unzip the archive file using the following command.

Next, create a version-independent soft link to facilitate future updates.

Now execute the following command to check for missing Perl modules for Bugzilla.

By running above command you will learn about the availability of any required or optional Perl modules on your machine. So, you will need to install all the required and optional Perl modules using this single command given below.

Now, you will need to edit the localconfig to add the database details. Execute the following command to open localconfig file using any text editor.

Find the following lines in the file and edit the values according to your database details like this:

Save the file and exit from the text editor.

Now run the checksetup.pl Perl script again to initialize Bugzilla using the following command.

You will be asked to enter your administrator details such as admin’s email address, admin name, and administrator password.

Next, you will need to change the ownership rules of Bugzilla files to allow Apache to access these files.

Create a Virtual Host

You have successfully installed Bugzilla on your CentOS 7 server but Apache web server not is not aware of this yet, so you will need to create a virtual host. Run the following command to do so.

Add the following content to the file.

Please replace value of ServerAdmin, ServerName, and, ServerAlias with your actual one. Save the file and exit, and then restart the Apache web server to apply changes using the following command.

Finally, you will need to modify the firewall rules. So, simply execute the following commands and they will do the job for you.

Testing

You have successfully installed Bugzilla on your server, you can test this installation using the Perl script like this:

Replace YourServerIP with your actual server IP address and if nothing goes wrong then you should see something similar to this:

Now open up your favorite web browser and visit http://YourServerIP to access the Bugzilla site. When you see Bugzilla web interface click on Log In button and then provide your administration credentials to login so that you can set up Bugzilla as you want.

Conclusion

In this guide, you learned to install Bugzilla bug tracking system on your CentOS 7 server. Now you can deploy your projects and track issues of your applications. We hope now you have enough knowledge to work with Bugzilla.

Reference:https://www.alibabacloud.com/blog/how-to-install-bugzilla-on-centos-7_594622?spm=a2c41.12714840.0.0

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.