Bugzilla is an open-source Web application, a bug tracking system and test tool developed by Mozilla and used by Mozilla Public License (MPL), which is often utilized by some high-tech companies such as Mozilla, Red Hat and gnome. Originally developed by Terry Weissman in 1998, Bugzilla was written in Perl and used MySQL as a backend database, a server software designed to help manage software development, with features such as rich functionality and highly optimized databases.
In this tutorial, we will install Bugzilla 5.0, use Apache as a WEB server, enable SSL for it, and install MySQL 5.1来 as a database system on FreeBSD 10.2.
Prepare
FreeBSD 10.2 64-bit system root authority is root
Update System
Log in to the FreeBSD server with SSH and update the software library:
sudo sufreebsd-update fetchfreebsd-update Install
Installing and configuring Apache
In this step we will use the PKG command to install Apache from the FreeBSD Software Library and then edit the "httpd.conf" file in the Apache24 directory to configure Apache to enable SSL and CGI support, and install Apache with the pkg command:
Pkg Install Apache24
Enter the Apache directory and edit the "httpd.conf" file with the Nano Editor:
Cd/usr/local/etc/apache24nano-c httpd.conf Uncomment the lines listed below: #第70行LoadModule authn_socache_module libexec/apache24/mod_ authn_socache.so# 89th row LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so# 117th Row LoadModule Expires_module libexec/apache24/mod_expires.so# line 141th, enable Sslloadmodule ssl_module libexec/apache24/mod_ssl.so# line 162th , support Cgiloadmodule Cgi_module libexec/apache24/mod_cgi.so# 174th Line, enable Mod_rewriteloadmodule Rewrite_module libexec/ apache24/mod_rewrite.so# Line No. 219, server name configuration servername 127.0.0.1:80
Save and exit, then we need to install the MoD perl from the FreeBSD Library and enable it:
Pkg Install Ap24-mod_perl2
Enable Mod_perl, edit the "httpd.conf" file and add the "Loadmodule" line:
Nano-c httpd.conf Add this line: #第175行LoadModule perl_module libexec/apache24/mod_perl.so
Save and exit, add the following line as the boot entry with the SYSRC command before Apache is enabled:
SYSRC Apache24_enable=yesservice Apache24 Start
Installing and configuring the MySQL database
We will use MySQL 5.1来 as the backend database and Support Perl module, install MySQL 5.1 with pkg command:
Pkg Install p5-dbd-mysql51 mysql51-server mysql51-client
Now we're going to set up the MySQL service to boot up and then configure the root password for MySQL and run the following command to do all of these things:
Sysrc mysql_enable=yesservice mysql-server startmysqladmin-u root password aqwe123
Note: here the mysql password is: aqwe123
Once the above steps are complete, we log in to the MySQL shell with root and create a new database and user for the Bugzilla installation. Log in to the MySQL shell using the following command:
Mysql-u root-ppassword:aqwe123
To add a database:
Create database bugzilladb;create User [email protected] identified by ' [e-mail protected] '; grant all privileges on Bugzill adb.* to [e-mail protected] identified by ' [email protected] '; Flush privileges;\q
The Bugzilla database was created with the name "BUGZILLADB" and the user name and password are "Bugzillauser" and "[email protected]" respectively.
generate a new SSL certificate
Generate a new self-signed SSL certificate in the "SSL" directory of the Bugzilla site, go to the Apache24 directory and create a new directory "SSL" here:
Cd/usr/local/etc/apache24/mkdir SSL; CD SSL
Next, generate the certificate file with the OpenSSL command, and then change its permissions:
sudo OpenSSL req-x509-nodes-days 365-newkey rsa:2048-keyout/usr/local/etc/apache24/ssl/bugzilla.key-out/usr/local/ Etc/apache24/ssl/bugzilla.crtchmod 600 *
Configuring a virtual host
We will install Bugzilla in the "/usr/local/www/bugzilla" directory, so we must create a new virtual host configuration for it, go to the Apache directory and create a new directory named "Vhost" for the virtual host file:
Cd/usr/local/etc/apache24/mkdir Vhost; CD Vhost
Now create a new file "bugzilla.conf" for the virtual host file:
Nano-c bugzilla.conf
Paste the following configuration in:
ServerName Mybugzilla.meserveralias Www.mybuzilla.meDocumentRoot/usr/local/www/bugzillaRedirect permanent/https:/ /mybugzilla.me/listen 443ServerName Mybugzilla.medocumentroot/usr/local/www/bugzillaerrorlog "/var/log/ Mybugzilla.me-error_log "Customlog"/var/log/mybugzilla.me-access_log "Commonsslengine onsslcertificatefile/usr/ Local/etc/apache24/ssl/bugzilla.crtsslcertificatekeyfile/usr/local/etc/apache24/ssl/bugzilla.keyaddhandler Cgi-script. cgioptions +execcgidirectoryindex index.cgi index.htmlallowoverride Limit FileInfo Indexes optionsrequire All granted
Save and exit, after the above is complete, create a new directory for the Bugzilla installation and add the virtual host configuration in the httpd.conf file to enable the Bugzilla virtual host, and run the following command in the Apache24 directory:
Mkdir-p/usr/local/www/bugzillacd/usr/local/etc/apache24/nano-c httpd.conf, add the following configuration: include etc/apache24/vhost/*. Conf
Save and exit, now test the Apache configuration and restart it with the "apachectl" command:
Apachectl Configtestservice Apache24 Restart
Installing Bugzilla
We can manually install the Bugzilla by downloading the source or install it from the FreeBSD library, and in this step we will install Bugzilla from the FreeBSD repository using the pkg command:
Pkg Install Bugzilla50
When the above steps are complete, go to the Bugzilla installation directory and install all the Perl modules required by the bugzilla.
Cd/usr/local/www/bugzilla./install-module--all
To wait until all is done, this will take some time, next, execute the "checksetup.pl" file in the Bugzilla installation directory to generate the configuration file "Localconfig".
./checksetup.pl
You'll see a message about the database configuration error, and you'll need to edit the "localconfig" file with the Nano Editor:
Nano-c Localconfig
Now add the third step to create the database. #第57行 $db _name = ' bugzilladb '; #第60行 $db _user = ' bugzillauser '; #第67行 $db _pass = ' [email protected] '; Save and exit, and then run "checksetup.pl" again:
./checksetup.pl
You will be prompted to enter your mailbox name and administrator account, just enter your email, username and password.
Finally, we need to change the owner of the installation directory to "www" and then restart Apache with the service command:
Cd/usr/local/www/chown-r www:www bugzillaservice apache24 Restart
Now that the Bugzilla is installed, you can view it by visiting mybugzilla.me, and you will be redirected to an HTTPS connection. Bugzilla home £ º
Bugzilla Admin Panel:
Conclusion
Bugzilla is a web-based application and can help you manage software development, which is developed in Perl and uses MySQL as a database system. Bugzilla help Mozilla, Redhat, GNOME and other companies to complete the software development work. The Bugzilla has many features and is easy to configure and install.
Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/
Installing Bugzilla on FreeBSD