Difference between revisions of "Cool Solution - Setting up Bugzilla with LDAP authentication"

From Univention Wiki

Jump to: navigation, search
(Created page with "{{Cool Solutions Disclaimer|Repository=yes|UCS=4.1}} {{Review-Status}} <pre>univention-install mysql-server univention-install make gcc libapache2-mod-perl2</pre> <pre>mysql -ur...")
 
Line 1: Line 1:
 
{{Cool Solutions Disclaimer|Repository=yes|UCS=4.1}}
 
{{Cool Solutions Disclaimer|Repository=yes|UCS=4.1}}
 
{{Review-Status}}
 
{{Review-Status}}
 +
 +
First things first prepare your system with the following packages:
 
<pre>univention-install mysql-server
 
<pre>univention-install mysql-server
 
univention-install make gcc libapache2-mod-perl2</pre>
 
univention-install make gcc libapache2-mod-perl2</pre>
 +
 +
The next step is, to create a database and a database user. It's necessary to create Bugzilla templates later on.
  
 
<pre>mysql -uroot -p$(cat /etc/mysql.secret)
 
<pre>mysql -uroot -p$(cat /etc/mysql.secret)
Line 10: Line 14:
 
mysql> exit</pre>
 
mysql> exit</pre>
  
 
+
Create a new file (e.g bugzilla) to setup a new website.
 
<pre>vim /etc/apache2/sites-available/bugzilla</pre>
 
<pre>vim /etc/apache2/sites-available/bugzilla</pre>
  
Line 20: Line 24:
 
</Directory></pre>
 
</Directory></pre>
  
 +
The following command enables the new website.
 
<pre>a2ensite bugzilla
 
<pre>a2ensite bugzilla
 
service apache2 reload</pre>
 
service apache2 reload</pre>
  
 
+
Please download the latest version of bugzilla at: [https://www.bugzilla.org/download/]
 
<pre>https://www.bugzilla.org/download/
 
<pre>https://www.bugzilla.org/download/
 
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.2.tar.gz
 
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.2.tar.gz
Line 32: Line 37:
 
cd /var/www/bugzilla</pre>
 
cd /var/www/bugzilla</pre>
  
 +
Execute the following command to check, if every needed module is installed.
 +
After the check is done, run the displayed command, to install or upgrade all modules, which are necessary.
 
<pre>./checksetup.pl --check-modules
 
<pre>./checksetup.pl --check-modules
/usr/bin/perl install-module.pl --all
+
/usr/bin/perl install-module.pl --all</pre>
  
./checksetup.pl</pre>
+
If the installation was succesfully, run the following script to create a bugzilla template.
  
 +
<pre>./checksetup.pl</pre>
 +
 +
Chechsetup.pl create a new file named localconfig. Please open this file and change the values as follow:
 
<pre>vim ./localconfig</pre>
 
<pre>vim ./localconfig</pre>
  
Line 45: Line 55:
 
$db_user = 'bugs';
 
$db_user = 'bugs';
 
$db_pass = 'your_own_passwd';</pre>
 
$db_pass = 'your_own_passwd';</pre>
 +
 +
By default, words must be at least four characters in length in order to be indexed by MySQL's full-text indexes. This causes a lot of Bugzilla specific words to be missed, including "cc", "ftp" and "uri".
 +
 +
It's useful  to add the following line in /etc/mysql/my.conf in the [mysqld] section
  
 
<pre>vim /etc/mysql/my.cnf
 
<pre>vim /etc/mysql/my.cnf
Line 52: Line 66:
 
  ft_min_word_len=2</pre>
 
  ft_min_word_len=2</pre>
  
 +
At least run the following command again and configure a Bugzilla administrator
 
<pre>cd /var/www/bugzilla
 
<pre>cd /var/www/bugzilla
 
./checksetup.pl
 
./checksetup.pl

Revision as of 12:12, 8 March 2016

Produktlogo UCS Version 4.1

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Packages provided by a Cool Solutions Repository are built by Univention, but will not be maintained. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.
Note: This article is not yet reviewed.


First things first prepare your system with the following packages:

univention-install mysql-server
univention-install make gcc libapache2-mod-perl2

The next step is, to create a database and a database user. It's necessary to create Bugzilla templates later on.

mysql -uroot -p$(cat /etc/mysql.secret)
mysql> CREATE USER 'bugs'@'localhost' IDENTIFIED BY  'your_own_passwd';
mysql> CREATE DATABASE `bugs`;
mysql> GRANT ALL PRIVILEGES ON  `bugs` . * TO  'bugs'@'localhost';
mysql> exit

Create a new file (e.g bugzilla) to setup a new website.

vim /etc/apache2/sites-available/bugzilla
<Directory /var/www/bugzilla/>
               AddHandler cgi-script .cgi
               Options +Indexes +ExecCGI
               DirectoryIndex index.cgi
               AllowOverride All
</Directory>

The following command enables the new website.

a2ensite bugzilla
service apache2 reload

Please download the latest version of bugzilla at: [1]

https://www.bugzilla.org/download/
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.2.tar.gz
tar xfz bugzilla-5.0.2.tar.gz
mv bugzilla-5.0.2 bugzilla
chown -R www-data.www-data bugzilla
mv bugzilla /var/www/
cd /var/www/bugzilla

Execute the following command to check, if every needed module is installed. After the check is done, run the displayed command, to install or upgrade all modules, which are necessary.

./checksetup.pl --check-modules
/usr/bin/perl install-module.pl --all

If the installation was succesfully, run the following script to create a bugzilla template.

./checksetup.pl

Chechsetup.pl create a new file named localconfig. Please open this file and change the values as follow:

vim ./localconfig
$webservergroup = 'www-data';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'your_own_passwd';

By default, words must be at least four characters in length in order to be indexed by MySQL's full-text indexes. This causes a lot of Bugzilla specific words to be missed, including "cc", "ftp" and "uri".

It's useful to add the following line in /etc/mysql/my.conf in the [mysqld] section

vim /etc/mysql/my.cnf

[mysqld]
 # Allow small words in full-text indexes
 ft_min_word_len=2

At least run the following command again and configure a Bugzilla administrator

cd /var/www/bugzilla
./checksetup.pl


Enter the e-mail address of the administrator: muster@example.com
Enter the real name of the administrator: mmuster
Enter a password for the administrator account:
Personal tools