How to Install Bugzilla on CentOS 7

Prerequisites

Update System

sudo yum -y update
sudo yum -y install epel-release

Install Perl

sudo yum -y install perl perl-CPAN perl-DBD-MySQL
perl -v
sudo yum -y install gcc gd gd-devel rst2pdf graphviz patchutils

Install Apache and MariaDB

sudo yum -y install httpd httpd-develsudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
sudo systemctl start httpd.servicesudo systemctl enable httpd.service
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bashsudo yum install MariaDB-server MariaDB-devel -y
sudo systemctl start mariadb.servicesudo systemctl enable mariadb.service
sudo /usr/bin/mysql_secure_installation
1. Enter current password for root (enter for none):  ENTER
2. Set root password? [Y/n]: Y
3. New password: `YourMariaDB_rootPassword`
4. Re-enter new password: `YourMariaDB_rootPassword`
5. Remove anonymous users? [Y/n]: `Y`
6. Disallow root login remotely? [Y/n]: `Y`
7. Remove test database and access to it? [Y/n]: `Y`
8. Reload privilege tables now? [Y/n]: `Y`
mysql -u root -p
CREATE DATABASE bugzilla_data;
CREATE USER 'bugzilla_user'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON bugzilla_data.* TO 'bugzilla_user'@'localhost';
FLUSH PRIVILEGES;
exit
sudo nano /etc/my.cnf.d/server.cnf
#Bugzilla
#Allow packets up to 16M
max_allowed_packet=16M
#Allow small words in full-text indexes
ft_min_word_len=2
sudo systemctl restart mariadb.service

Install Bugzilla

cdwget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.4.tar.gz
sudo tar -C /opt -zxvf bugzilla-5.0.4.tar.gz
sudo ln -s /opt/bugzilla-5.0.4 /var/www/html/bugzilla
sudo /var/www/html/bugzilla/checksetup.pl
sudo /usr/bin/perl /var/www/html/bugzilla/install-module.pl --all
sudo nano /var/www/html/bugzilla/localconfig
$webservergroup = 'apache';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla_data';
$db_user = 'bugzilla_user';
$db_pass = 'StrongPassword';
sudo /var/www/html/bugzilla/checksetup.pl
sudo chown -R apache:apache /opt/bugzilla-5.0.4

Create a Virtual Host

sudo nano /etc/httpd/conf.d/bugzilla.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/bugzilla/
ServerName bugzilla.example.com
ServerAlias www.bugzilla.example.com
<Directory /var/www/html/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options AuthConfig
</Directory>
ErrorLog /var/log/httpd/bugzilla.example.com-error_log
CustomLog /var/log/httpd/bugzilla.example.com-access_log common
</VirtualHost>
sudo systemctl restart httpd.service
sudo firewall-cmd --zone=public --add-port=80/tcp --permanentsudo firewall-cmd --reload

Testing

sudo /var/www/html/bugzilla/testserver.pl http://YourServerIP
TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got padlock picture.
TEST-OK Webserver is executing CGIs via mod_cgi.
TEST-OK Webserver is preventing fetch of http://YourServerIP/localconfig.
TEST-OK GD version 2.68, libgd version 2.0.34; Major versions match.
TEST-OK GD library generated a good PNG image.
TEST-OK Chart library generated a good PNG image.
TEST-OK Template::Plugin::GD is installed.

Conclusion

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Find All Articulation Points In A Graph

Using the Java Library — Chapter 6

Dimensions of The Scrum Framework

Kubernetes on CoreOS Cluster

RDS SQL Server– Best Practices of Execution Plan Cache for Missing Indexes

Deploying Kubeflow Pipelines on Alibaba Cloud

Securing API Gateway using Auth0

Web+: Alibaba Cloud’s Web App Service (Part 2)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Publish Data from Wio Terminal to Qubitro IoT Platform

How to Set-up and Configure Docker On AWS cloud

Building with — pull

SAP CLOUD INTEGRATION CI/CD USING GITLAB