We are going to use Apache as a web server in this tutorial. To install it execute the command below:<\/p>\r\n
sudo apt install apache2<\/pre>\r\nAfter successfull installation, start and enable the service<\/p>\r\n
sudo systemctl start apache2 && sudo systemctl enable apache2<\/pre>\r\nTo check if everything is OK, execute the following command for the status of the Apache2 service:<\/p>\r\n
sudo systemctl status apache2<\/pre>\r\nYou should receive the following output:<\/p>\r\n
root@vps:~# sudo systemctl status apache2\r\n\u25cf apache2.service - The Apache HTTP Server\r\n Loaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; vendor preset: enabled)\r\n Active: active (running) since Sat 2022-04-02 12:35:15 UTC; 36min ago\r\n Docs: https:\/\/httpd.apache.org\/docs\/2.4\/\r\n Main PID: 44676 (apache2)\r\n Tasks: 7 (limit: 4617)\r\n Memory: 15.5M\r\n CGroup: \/system.slice\/apache2.service\r\n<\/pre>\r\n<\/span>Step 3. Install Perl and Dependencies<\/span><\/h2>\r\nSince Bugzilla is written in Perl programming language, we need to install it along with the dependencies.<\/p>\r\n
sudo apt install build-essential libappconfig-perl libdate-calc-perl libtemplate-perl libmime-tools-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libfile-which-perl libauthen-sasl-perl libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libgd-dev libmysqlclient-dev graphviz sphinx-common rst2pdf libemail-address-perl libemail-reply-perl\r\n<\/pre>\r\n<\/span>Step 4. Install MariaDB database server<\/span><\/h2>\r\nTo install the MariaDB database server, execute the command below.<\/p>\r\n
sudo apt install mariadb-server<\/pre>\r\nStart and enable the mariadb.service with the following commands:<\/p>\r\n
sudo systemctl start mariadb && sudo systemctl enable mariadb<\/pre>\r\nCheck the status of the mariadb.service<\/p>\r\n
sudo systemctl status mariadb<\/pre>\r\nYou should receive the following output:<\/p>\r\n
root@vps:~# sudo systemctl status mariadb\r\n\u25cf mariadb.service - MariaDB 10.3.34 database server\r\n Loaded: loaded (\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: enabled)\r\n Active: active (running) since Sat 2022-04-02 13:30:06 UTC; 7min ago\r\n Docs: man:mysqld(8)\r\n https:\/\/mariadb.com\/kb\/en\/library\/systemd\/\r\n Main PID: 70881 (mysqld)\r\n Status: \"Taking your SQL requests now...\"\r\n Tasks: 30 (limit: 4617)\r\n Memory: 65.3M\r\n CGroup: \/system.slice\/mariadb.service\r\n \u2514\u250070881 \/usr\/sbin\/mysqld<\/pre>\r\n<\/span>Step 5. Create Bugzilla database and user<\/span><\/h2>\r\nNext, we need to create a Bugzilla database, the Bugzilla user, and grant the permissions for that user to the database.<\/p>\r\n
CREATE USER 'bugzilla'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';\r\n CREATE DATABASE bugzilla;\r\n GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzilla'@'localhost';\r\n FLUSH PRIVILEGES;\r\n EXIT;\r\n<\/pre>\r\n<\/span>Step 6. Install Bugzilla<\/span><\/h2>\r\nBefore we can install Bugzilla we need to download the latest stable version.<\/p>\r\n
cd \/var\/www\/html\r\n\r\nwget https:\/\/ftp.mozilla.org\/pub\/mozilla.org\/webtools\/bugzilla-5.0.6.tar.gz<\/pre>\r\nOnce downloaded, extract the bugzilla file.<\/p>\r\n
tar -xvf bugzilla-5.0.6.tar.gz -C \/var\/www\/html\/\r\n\r\n mv bugzilla-5.0.6 bugzilla\r\n <\/pre>\r\nOnce, this is done go into the “bugzilla” directory and check the setup.<\/p>\r\n
cd \/var\/www\/html\/bugzilla\/\r\n\r\n.\/checksetup.pl<\/pre>\r\nIf the setup, fails due to some missing Perl modules, you should receive the following output:<\/p>\r\n
COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands\r\nand then re-run checksetup.pl):\r\n\r\n \/usr\/bin\/perl install-module.pl DateTime\r\n \/usr\/bin\/perl install-module.pl DateTime::TimeZone\r\n \/usr\/bin\/perl install-module.pl Template\r\n \/usr\/bin\/perl install-module.pl Email::Sender\r\n \/usr\/bin\/perl install-module.pl Email::MIME\r\n \/usr\/bin\/perl install-module.pl List::MoreUtils\r\n \/usr\/bin\/perl install-module.pl Math::Random::ISAAC\r\n \/usr\/bin\/perl install-module.pl JSON::XS\r\n\r\nTo attempt an automatic install of every required and optional module\r\nwith one command, do:\r\n\r\n \/usr\/bin\/perl install-module.pl --all\r\n\r\n*** Installation aborted. Read the messages above. ***\r\n<\/pre>\r\nExecute the commands below to install the required modules:<\/p>\r\n
\/usr\/bin\/perl install-module.pl DateTime\r\n\/usr\/bin\/perl install-module.pl DateTime::TimeZone\r\n\/usr\/bin\/perl install-module.pl Template\r\n\/usr\/bin\/perl install-module.pl Email::Sender\r\n\/usr\/bin\/perl install-module.pl Email::MIME\r\n\/usr\/bin\/perl install-module.pl List::MoreUtils\r\n\/usr\/bin\/perl install-module.pl Math::Random::ISAAC\r\n\/usr\/bin\/perl install-module.pl JSON::XS\r\n\/usr\/bin\/perl install-module.pl ExtUtils::PkgConfig module\r\n<\/pre>\r\nOnce, the required modules are installed you need to check the setup again:<\/p>\r\n
.\/checksetup.pl<\/pre>\r\nNow, when the modules are installed, the next message that you should receive is that there is an error with the database connection:<\/p>\r\n
There was an error connecting to MySQL:\r\n\r\n Access denied for user 'bugs'@'localhost'\r\n\r\nThis might have several reasons:\r\n\r\n* MySQL is not running.\r\n* MySQL is running, but there is a problem either in the\r\n server configuration or the database access rights. Read the Bugzilla\r\n Guide in the doc directory. The section about database configuration\r\n should help.\r\n* Your password for the 'bugs' user, specified in $db_pass, is\r\n incorrect, in '.\/localconfig'.\r\n* There is a subtle problem with Perl, DBI, or MySQL. Make\r\n sure all settings in '.\/localconfig' are correct. If all else fails, set\r\n '$db_check' to 0.\r\n<\/pre>\r\nTo solve this, you need to open the “\/var\/www\/html\/bugzilla\/localconfig<\/b>” file with your favorite editor and make the following changes:<\/p>\r\nsudo nano \/var\/www\/html\/bugzilla\/localconfig<\/pre>\r\nEnter the name of the database, user, and the password you set in step 5.<\/p>\r\n
$webservergroup = 'www-data';\r\n$db_driver = 'mysql';\r\n$db_host = 'localhost';\r\n$db_name = 'bugzilla';\r\n$db_user = 'bugzilla';\r\n$db_pass = 'YourStrongPasswordHere';\r\n$db_port = 0;\r\n<\/pre>\r\nAfter these settings are done run the .\/checksetup.pl<\/b> again.<\/p>\r\n.\/checksetup.pl<\/pre>\r\nYou should define your administrator’s email, username and password once the database connection is successful.<\/p>\r\n
Checking for DBD-mysql (v4.001) ok: found v4.050\r\nChecking for MySQL (v5.0.15) ok: found v5.5.5-10.3.34-MariaDB-0ubuntu0.20.04.1\r\n\r\nRemoving existing compiled templates...\r\nPrecompiling templates...done.\r\nFixing file permissions...\r\nInitializing \"Product\/Component Changes\" email_setting ...\r\nInitializing \"Dependency Tree Changes\" email_setting ...\r\nMarking closed bug statuses as such...\r\nCreating default classification 'Unclassified'...\r\nSetting up foreign keys...\r\nSetting up the default status workflow...\r\nCreating default groups...\r\nSetting up user preferences...\r\n\r\nLooks like we don't have an administrator set up yet. Either this is\r\nyour first time using Bugzilla, or your administrator's privileges\r\nmight have accidentally been deleted.\r\n\r\nEnter the e-mail address of the administrator: admin@yourdomain.com<\/b>\r\nEnter the real name of the administrator: admin<\/b>\r\nEnter a password for the administrator account: \r\nPlease retype the password to verify:\r\nadmin@yourdomain.com<\/b> is now set up as an administrator.\r\nCreating initial dummy product 'TestProduct'...\r\n\r\nNow that you have installed Bugzilla, you should visit the 'Parameters'\r\npage (linked in the footer of the Administrator account) to ensure it\r\nis set up as you wish - this includes setting the 'urlbase' option to\r\nthe correct URL.\r\nchecksetup.pl complete.\r\n<\/pre>\r\n<\/span>Step 7. Create a Virtual Host configuration file<\/span><\/h2>\r\nIn order can access the Bugzilla Web interface we need to create a virtual host configuration file where we can define our domain, document root, and some script parameters.<\/p>\r\n
First, create the configuration file with the following command:<\/p>\r\n
touch \/etc\/apache2\/sites-available\/bugzilla.conf<\/pre>\r\nOpen the file, and paste the following lines of code:<\/p>\r\n
<VirtualHost *:80>\r\nServerName yourdomain.com\r\nDocumentRoot \/var\/www\/html\/bugzilla\/\r\n\r\n<Directory \/var\/www\/html\/bugzilla\/>\r\nAddHandler cgi-script .cgi\r\nOptions +Indexes +ExecCGI\r\nDirectoryIndex index.cgi\r\nAllowOverride Limit FileInfo Indexes Options AuthConfig\r\n<\/Directory>\r\n\r\nErrorLog \/var\/log\/apache2\/yourdomain.com.error_log\r\nCustomLog \/var\/log\/apache2\/yourdomain.com.access_log common\r\n<\/VirtualHost>\r\n<\/pre>\r\nEnable the Apache2 confguration file and other modules:<\/p>\r\n
sudo a2ensite bugzilla.conf\r\n\r\nsudo a2enmod headers env rewrite expires cgi\r\n<\/pre>\r\nCheck the syntax of the Apache2 configuration.<\/p>\r\n
apachectl -t<\/pre>\r\nYou should receive the following output:<\/p>\r\n
root@host:~# apachectl -t\r\nSyntax OK\r\n<\/pre>\r\nIf you receive this output you can safely restart the Apache service.<\/p>\r\n
sudo systemctl restart apache2<\/pre>\r\nNow, you can access the Bugzilla Web interface at http:\/\/YourDomain.com<\/b><\/p>\r\n
<\/p>\r\n
\r\n\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n <\/p>\r\n
Congratulations! You successfully installed and configured Bugzilla tracking software on Ubuntu 20.04. If you find it difficult to install, you can always contact our technical support and they will do the rest for you. We are available 24\/7.<\/p>\r\n
If you liked this post on how to install Bugzilla on Ubuntu 20.04, please share it with your friends on social networks or simply leave a reply below. Thanks.<\/p>","protected":false},"excerpt":{"rendered":"
In this blog post, we are going to explain in step-by-step detail on how to install Bugzilla on Ubuntu 20.04. … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":41228,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[284,1603,1839],"yoast_head":"\nHow to Install Bugzilla on Ubuntu 20.04 - RoseHosting<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n \n\t \n\t \n\t \n