Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > Gazelle
Reply
  #1  
Old 19-08-11, 13:43
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 963
Default How to install Gazelle RC2 on Debian or Ubuntu
http://what.cd/gazelle/wiki.php?action=article&id=4


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 http://mirror.cc.columbia.edu/pub/so...-2.2.19.tar.gz

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 http://memcached.googlecode.com/file...d-1.4.5.tar.gz
tar -xvf memcached-1.4.5.tar.gz && cd memcached-1.4.5
./configure make make install



5. Install PHP

cd /usr/local && wget http://us3.php.net/get/php-5.3.3.tar...om/this/mirror

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 http://pecl.php.net/get/memcache-2.2.4.tgz 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/memcache.so /usr/local/lib/php/extensions/no-debug-non-zts-20090626/



Add extension=memcache.so 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/libphp5.so <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 127.0.0.1, or 127.0.1.1) - 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: http://www.sphinxsearch.com/docs/current.html

Sphinx is a bit tricky. You have been warned.


Run this:

cd /usr/local && wget http://sphinxsearch.com/downloads/sp...10-beta.tar.gz 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 http://what.cd/gazelle.
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: http://grc.com/passwords.html

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

make
sudo make all install


For common installation problems, see here: http://what.cd/gazelle/forums.php?ac...ead&threadid=2


12. Test your site thoroughly.

Report any bugs here http://what.cd/gazelle/forums.php?ac...orum&forumid=3
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)
Reply

Tags
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 00:33. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.