How to install Bugzilla on a FreeBSD 7.2 with Apache + SSL and MySQL?
How to install Bugzilla 3.4.2 on FreeBSD 7.2.
The basic overivew.
- Install FreeBSD.
How do I install FreeBSD? - Update FreeBSD and download the ports tree.
What are the first commands I run after installing FreeBSD - Then install Apache + SSL.
Installing an Apache + SSL on FreeBSD using the ports tree - Then install MySQL.
How to install MySQL on FreeBSD 7.2 or on Red Hat 5.4? - Configure MySQL to be Unicode.
How to create a UTF-8 Unicode Database on MySQL and make UTF-8 Unicode the default? - Then install Bugzilla
I have previous documents about installing each of the steps above installing Bugzilla. This document will over cover bugzilla.
Installing Bugzilla From Ports
You can install easily from Ports. Make sure your ports tree is up to date:
$ su Password:
ServerName#
ServerName#
ServerName#portsnap fetch
portsnap extract
portsnap udpateThen just do this to install Bugzilla 3.4.2 on FreeBSD 7.2.
ServerName#
ServerName#cd /usr/ports/devel/bugzilla
make BUGZILLADIR=/usr/local/www/apache22/data/bugzilla installNote: Make sure you choose the correct install directory for the BUGZILLADIR parameter. By default Apache 2.2 is only serving up files in /usr/local/www/apache22/data/ so by install bugzilla there, you will be able to access bugzilla with this url: http://www.YourWebSite.com/bugzilla
You will be asked to select your compile options throughout. If you don’t want to be promtped, and you want to accept the defaults, use this command.
ServerName# make BATCH=yes install Now that you have Bugzilla 3.4.2 on your FreeBSD 7.2 server, you are not finished. We now need to connect to connect it to a database, which I am assuming is MySQL but could just as easily be Postgresql.
Resetting the file ownership recursively on the bugzilla folder
Make sure that the bugzilla folder and all subfolders are owned by www:www.
ServerName# chown -R www:www /usr/local/www/apache22/data/bugzilla
Creating a MySQL Database
- Log into mysql. I use the command line and type in mysql -p, enter my password when prompted.
- Create a database for Bugzilla.
- Create a user that can access Bugzilla.
I use the followiing SQL commands for these steps:
CREATE DATABASE BugDB GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON BugDB.* TO BugDBUser@localhost IDENTIFIED BY 'P@sswd!'; FLUSH PRIVILEGES;
Run Install Check Script
- In a command prompt go to /usr/local/www/data/bugzilla
ServerName# cd /usr/local/www/data/bugzilla - Run the setup checking script.
ServerName# ./checksetup.pl - Now you are ready to open and edit the localconfig file.
ServerName# ee localconfig - Run ./checksetup.pl again.
- Run checksetup.pl again.
I got this error:
Creating ./lib/.htaccess…
No such file or directory at Bugzilla/Install/Filesystem.pm line 445, line 275.I had to manually create the /usr/local/www/apache22/data/bugzilla/lib directory then this error disappeared when I ran checksetup.pl again.
- Now create an Apache configuration file for bugzilla and put it in /usr/local/etc/apache22/Includes. I name it bugzilla.conf.
bugzilla.conf
<Directory "/usr/local/www/apache22/data/bugzilla"> Options +ExecCGI AllowOverride Limit DirectoryIndex index.cgi AddHandler cgi-script .cgi </Directory>
Restart Apache
ServerName# /usr/local/etc/rc.d/apache22 restart
Change the following values:
$db_name = ‘BugDB’
$db_user = ‘BugDBUser’
$db_pass = ‘P@sswd!’
Then close and save the localconfig file.
Note: If you have installled everything including MySQL using the defaults, you will see this warning:
Resolve this using the MySQL configuration file called my.cnf. I discussed the my.cnf earlier in this article, so you should already be familiar with it.
How to create a UTF-8 Unicode Database on MySQL and make UTF-8 Unicode the default?
Find the max_allowed_packet settings and change it to 4M.
Restart MySQL.
ServerName# | /usr/local/etc/rc.d/mysql-server restart |
You should now be able to connect to your server: http://YourServer/bugzilla
Copyright ® Rhyous.com – Linking to this article is allowed without permission and as many as ten lines of this article can be used along with this link. Any other use of this article is allowed only by permission of Rhyous.com.