Bravo List
Go Back   > Bravo List > Source Code > Trackers > Gazelle
Old 19-08-11, 13:43
Fynnon's Avatar
Fynnon Fynnon is offline
Join Date: Nov 2007
Posts: 963
Default How to install Gazelle RC2 on Debian or Ubuntu

This guide is designed for Debian based systems (Ubuntu for example).
This tutorial is going to assume you are installing it under a vhost in /var/www.

1. Update software, and package cache:

sudo aptitude update && sudo aptitude safe-upgrade

2. Build essentials (install important stuff):

sudo aptitude install build-essential gcc wget subversion automake libtool make g++ -f mysql-server mysql-client libmysqlclient15-dev libboost-date-time-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev zlib1g-dev libpng-dev libmcrypt-dev libxml2-dev libevent-dev libmysqld-dev

apache2, php5, memcached, and sphinxsearch are also in the Debian package repository so you don't need to build by hand.
If you run Sid (unstable) you will get the versions described below.

sudo apt-get install apache2 php5 memcached sphinxsearch

3. Install Apache HTTP Server:

cd /usr/local && wget

That will then change the remainder of the guide when referencing version:

tar -xzvf httpd-2.2.19.tar.gz && cd httpd-2.2.19

./configure --enable-so make make install /usr/local/apache2/bin/apachectl start /usr/local/apache2/bin/apachectl stop

4. Install Memcached (you can also use this shell script to install memcache automatically)

cd /usr/local && wget
tar -xvf memcached-1.4.5.tar.gz && cd memcached-1.4.5
./configure make make install

5. Install PHP

cd /usr/local && wget

tar xzvf mirror && cd php-5.3.3

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mcrypt --with-mysqli --with-gd --enable-mbstring

make make install libtool --finish /usr/local/php-5.3.3/libs

cp php.ini-development /usr/local/lib/php.ini cd /usr/local/src/ && wget tar xzvf memcache-2.2.4.tgz && cd memcache-2.2.4 phpize && ./configure --enable-memcache && make mkdir -p /usr/local/lib/php/extensions/no-debug-non-zts-20090626

cp modules/ /usr/local/lib/php/extensions/no-debug-non-zts-20090626/

Add to your php.ini (/usr/local/lib/php.ini) file and restart the webserver (/usr/local/apache2/bin/apachectl restart)

While in php.ini - find the line: "short_open_tag = Off" - Turn it On, and restart apache

6. Locate HTTPD.conf

Should be in /usr/local/apache2/conf
add the following lines to the the bottom of the .conf file:

PHP Code:
LoadModule php5_module modules/ <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.ph(p[2-6]?|tml)$"SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"SetHandler application/x-httpd-php-source </FilesMatch
you can add this as well, so you can set where your files are served from:

PHP Code:
<VirtualHost *:80DocumentRoot /var/www <Directory "/var/www"AllowOverride All allow from all Options +Indexes </Directory> </VirtualHost
Test it:

/usr/local/apache2/bin/apachectl start

Create a PHP file with the folowing code in it: <?php phpinfo(); ?>

Place that file in your web root (in this case, /var/www) and navigate to localhost (either, or - See if you have success!

7. Start Memcache (if you used the shell script from step 4, skip this step as memcache is already running!)

memcached -d -m XXX -s /var/run/memcached.sock -a 0777 -t16 -C -u root

xxx= megabytes of ram. We used 512 for the -m XXX bit.

8. Run an SQL query for gazelle.sql to create the database, the table, and the default data.

To use the code below you must first extract gazelle.sql (from the latest release) to /var/www/

mysql -u root -p < /var/www/gazelle.sql

9. Install Sphinx - for documentation, see:

Sphinx is a bit tricky. You have been warned.

Run this:

cd /usr/local && wget tar xzvf sphinx-1.10-beta.tar.gz && cd sphinx-1.10-beta

./configure make make install

Use the sphinx.conf included in the latest Gazelle tarball build
Put sphinx.conf in /usr/local/sphinx-1.10-beta as sphinx.conf.

You will need to edit in your database settings, otherwise nothing will work.
(Really important ones are lines 11, 99, 312-315)

Run the following commands:

mkdir -p /var/data/sphinx/delta /usr/local/bin/indexer -c /usr/local/sphinx-1.10-beta/sphinx.conf --all
mkdir -p /var/log/searchd/ /usr/local/bin/searchd

If you get any errors, try to debug it yourself. If all else fails, post in the forums or join IRC.

10. Front-end Install

a. Get the latest copy of Gazelle from
Once you have downloaded and extracted it, upload it to your server.

b. Run the following command:

cp /var/www/classes/config.template /var/www/classes/config.php

c. With FileZilla or a shell editor, open config.php

This your main configuration file for Gazelle.
Set all the settings for your site, how you want them.

The important bit is the SITE_SALT and other hashes.
You can use this site to make good hash keys:

P.S. if you get a MYSQL SOCK error, change the line about that in the config file to /var/run/mysqld/mysqld.sock

d. Register at your site, you will be made a SysOp automatically. You will not be sent an email, just login.
You'll need to configure the email server later.

e. Setup cron jobs:

Use the following command: crontab -e

Enter this:

0,15,30,45 * * * * /usr/local/bin/php /var/www/schedule.php INSERT_YOUR_SCHEDULE_KEY >> /root/schedule.log
10,25,40,55 * * * * /usr/local/bin/php /var/www/peerupdate.php INSERT_YOUR_SCHEDULE_KEY >> /root/peerupdate.log
* * * * * /usr/local/bin/indexer -c /usr/local/sphinx-1.10-beta/sphinx.conf --rotate delta requests_delta
5 0,12 * * * /usr/local/bin/indexer -c /usr/local/sphinx-1.10-beta/sphinx.conf --rotate --all

Where SCHEDULE_KEY is the password you set in classes/config.php

11. Back-end install (XBTT)

***This probably wont work, I have a version which I will test again that should work on Debian***

cd /var/www/ && tar xzvf xbtt.tar.gz && cd xbtt/build/xbtt

configure --bindir=/path/to/xbtt/xbtt/bin --libdir=/path/to/xbtt/xbtt/lib --libexecdir=/path/to/xbtt/xbtt/lib --enable-epoll

sudo make all install

For common installation problems, see here:

12. Test your site thoroughly.

Report any bugs here
Explain the bug in detail.
Reply With Quote
The Following 3 Users Say Thank You to Fynnon For This Useful Post:
An0nym (23-12-12), HeARtLeSs (27-08-11), peiratikos (19-12-12)

debian , gazelle , install , rc2 , ubuntu

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:03. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.