Document ID: 0030
Topic: web, bug reporting, perl
Created: 2008-10-14
Last Updated: 2008-10-14
Author: Stefan Parvu
References: Perl 10, Bugzilla
OS: Solaris 10+
Note: This is work in progress !
This is a short introduction in how can you setup Bugzilla on Solaris using Perl and an web server using CGI or FastCGI. The current document focuses on Solaris 10 version and Sun Java System Webserver as software infrastructure used by Bugzilla. Since there are dozens of tutorials about Bugzilla + Apache the current blueprint will explain how to configure Bugzilla on Sun's Webserver 7.0 update 3 and Solaris. The database used in this example is: PostgreSQL but Mysql as well can be used. Perl 10.0 has been used.
Note: For those interested about Apache 2.x please check the relevant documentation how to setup Bugzilla on Apache platforms.|
Perl Webserver Database Bugzilla |
compile and setup Perl 10 install Sun Java System Webserver 7.0u3 configure PostgreSQL setup bugzilla |
|
Initial accounts Webserver settings |
getting started: setup intial accounts web server configurations |
Bugzilla uses Perl as a language so we will need a proper installation of Perl on your system. Solaris 10 already comes with Perl tools pre-installed but to keep the things sane and dont confuse with the version delivered by the OS vendor we will plan to install and configure our own version. This way we can easily add, remove any Perl package we would like.
We will need to do the following to get ready our own version of Perl compiled and installed under Solaris 10. The compiler used here is Sun's Studio 12, but GNU compiler, gcc can be easily used as well.
$ wget http://www.perl.com/CPAN/src/perl-5.10.0.tar.gz
$ gzip -dc perl-5.10.0.tar.gz | tar xvf -
$ cd perl-5.10.0
$ ./Configure -des -Dprefix=/opt/perl
$ make
If you want you can have Gnu compiler as well but provide -Dcc=gcc
$ make test
$ make install , as root
# perl -MCPAN -e shell
install CGI
install Date::Format
install DBI
install File::Spec
install Template
install Email::Send
install Email::MIME::Modifier
install GD
install Template::Plugin::GD::Image
install Chart::Base
install GD::Graph
install GD::Text
install MIME::Parser
install PatchReader
install HTML::Parser
install HTML::Scrubber
install Email::MIME::Attachment::Stripper
install Email::Reply
As already mentioned we will use instead of the popular Apache, Sun's version of the webserver: SJS Webserver from Sun's site. If you notice that the http link is not accurate please report this to the author of this document or search under Sun's site for Sun Java System Webserver.
Install the software under /opt/ws7 complete installation and setup a default HTTP instance, called as your machine name. If you would like to restrict the usage to the webserver to HTTPS, make sure your instance listens on 443 and you define a group of users which are able to access webserver's resources.
Bugzilla uses PostgreSQL or Mysql as a backend database. For this example we will use PostgreSQL. Solaris 10 already comes with PostgreSQL 8.1 and 8.2 versions of the databases. We will use 8.1 for this setup. In near future we should use the latest version and make the needed modifications.
# su - postgres
Make sure the DB is up and running. If not follow to setup a blank
DB instance
If you use PostgreSQL 8.3, create the DB:
$ /usr/postgres/8.3/bin/initdb -D /var/postgres/8.3/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".
fixing permissions on existing directory /var/postgres/8.3/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in /var/postgres/8.3/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 .
You can use directly PostgreSQL 8.3:
$ svcadm enable postgresql_83:default_32bit
$ createuser -U postgres -dAP bugs
runing this as postgres user and remember this
password because will be needed to bugzilla's localconfig file
$ vi /var/lib/pgsql/data/pg_hba.conf
host all bugs 127.0.0.1 255.255.255.255 md5 ...
# svcadm restart postgresql:version_81
or for PostgreSQL 8.3:
$ svcadm restart postgresql_83:default_32bit
At this moment all needed software has been installed and proper configured: web server, database and the Perl 10 compiler. You can now download bugzilla release and start configuring.
[...]
Adding new table series ...
Adding new table series_categories ...
Adding new table series_data ...
Adding new table setting ...
Adding new table setting_value ...
Adding new table tokens ...
Adding new table user_group_map ...
Adding new table versions ...
Adding new table votes ...
Adding new table watch ...
Adding new table whine_events ...
Adding new table whine_queries ...
Adding new table whine_schedules ...
Removing index 'longdescs_thetext_idx' from the longdescs table...
Adding new index 'profiles_login_name_lower_idx' to the profiles table ...
Adding new index 'fielddefs_name_lower_idx' to the fielddefs table ...
Adding new index 'keyworddefs_name_lower_idx' to the keyworddefs table ...
Adding new index 'products_name_lower_idx' to the products table ...
Inserting values into the 'bug_status' table:
'UNCONFIRMED' sortkey: 100
'NEW' sortkey: 200
'ASSIGNED' sortkey: 300
'REOPENED' sortkey: 400
'RESOLVED' sortkey: 500
'VERIFIED' sortkey: 600
'CLOSED' sortkey: 700
Inserting values into the 'priority' table:
'P1' sortkey: 100
'P2' sortkey: 200
'P3' sortkey: 300
'P4' sortkey: 400
'P5' sortkey: 500
Inserting values into the 'rep_platform' table:
'All' sortkey: 100
'PC' sortkey: 200
'Macintosh' sortkey: 300
'Other' sortkey: 400
Inserting values into the 'resolution' table:
'' sortkey: 100
'FIXED' sortkey: 200
'INVALID' sortkey: 300
'WONTFIX' sortkey: 400
'DUPLICATE' sortkey: 500
'WORKSFORME' sortkey: 600
'MOVED' sortkey: 700
Inserting values into the 'op_sys' table:
'All' sortkey: 100
'Windows' sortkey: 200
'Mac OS' sortkey: 300
'Linux' sortkey: 400
'Other' sortkey: 500
Inserting values into the 'bug_severity' table:
'blocker' sortkey: 100
'critical' sortkey: 200
'major' sortkey: 300
'normal' sortkey: 400
'minor' sortkey: 500
'trivial' sortkey: 600
'enhancement' sortkey: 700
Creating ./data directory...
Creating ./data/attachments directory...
Creating ./data/duplicates directory...
Creating ./data/mimedump-tmp directory...
Creating ./data/mining directory...
Creating ./data/webdot directory...
Creating ./extensions directory...
Creating graphs directory...
Creating skins/contrib directory...
Creating skins/custom directory...
Creating ./data/mail...
Precompiling templates...
Fixing file permissions...
Initializing "Dependency Tree Changes" email_setting ...
Creating group admin...
Creating group tweakparams...
Creating group editusers...
Creating group creategroups...
Creating group editclassifications...
Creating group editcomponents...
Creating group editkeywords...
Creating group editbugs...
Creating group canconfirm...
Creating group bz_canusewhines...
Creating group bz_sudoers...
Creating group bz_canusewhineatothers...
Creating group bz_sudo_protect...
Adding a new user setting called 'skin'
Adding a new user setting called 'lang'
Adding a new user setting called 'post_bug_submit_action'
Adding a new user setting called 'per_bug_queries'
Adding a new user setting called 'zoom_textareas'
Adding a new user setting called 'csv_colsepchar'
Adding a new user setting called 'state_addselfcc'
Adding a new user setting called 'comment_sort_order'
Adding a new user setting called 'display_quips'
Looks like we don't have an administrator set up yet.
Either this is your first time using Bugzilla, or your
administrator's privileges might have accidentally been deleted.
Enter the e-mail address of the administrator: yourname@your.mail.com
Enter the real name of the administrator: Your Name
Enter a password for the administrator account:
Please retype the password to verify:
yourname@your.mail.com is now set up as an administrator.
Creating default classification 'Unclassified'...
Creating initial dummy product 'TestProduct'...
Now that you have installed Bugzilla, you should visit the
'Parameters' page (linked in the footer of the Administrator
account) to ensure it is set up as you wish - this includes
setting the 'urlbase' option to the correct URL.
Back to main homepage
This document is Copyright (c) 2008 Stefan Parvu
Document License:
PDL