2011-03-28 14:21:28 +00:00
INSTALLATION NOTES
1. Set up MySQL and memcached. We run memcached with the command:
memcached -d -m 5120 -s /var/run/memcached.sock -a 0777 -t16 -C -u root
2012-09-09 08:00:26 +00:00
This gives it 5 gigs of RAM; you probably want to set that a bit lower!
2011-03-28 14:21:28 +00:00
2. Run gazelle.sql (preferably as root) to create the database, the table, and the default data.
2013-07-10 00:08:53 +00:00
3. Install Sphinx - we recommend you use the included sphinx.conf. You can copy this to
/etc/sphinx/sphinx.conf. You need to fill in the details of the SQL server though!
You might also need to create the /var/data/sphinx folder.
2011-03-28 14:21:28 +00:00
For documentation, read http://www.sphinxsearch.com/docs/current.html
2013-02-22 08:00:24 +00:00
2012-09-09 08:00:26 +00:00
After you've installed sphinx, create the indices:
2011-03-28 14:21:28 +00:00
/usr/local/bin/indexer -c /etc/sphinx/sphinx.conf --all
2013-02-22 08:00:24 +00:00
4. Move classes/config.template to classes/config.php. Edit the config.php as needed.
2011-03-28 14:21:28 +00:00
We use http://grc.com/passwords.html for our passwords - you'll be generating a lot of these.
2012-09-09 08:00:26 +00:00
5. Sign up. The first user is made a SysOp!
2013-02-22 08:00:24 +00:00
6. Set up cron jobs. You need a cron job for the schedule, a cron job for
the peerupdate (all groups are cached, but the peer counts change often,
2013-07-10 00:08:53 +00:00
so peerupdate is a script to update them), and the two Sphinx indices.
These are our cron jobs. SCHEDULE_KEY is the same as in classes/config.php:
2011-03-28 14:21:28 +00:00
0,15,30,45 * * * * /usr/local/bin/php /var/www/vhosts/what/schedule.php SCHEDULE_KEY >> /root/schedule.log
10,25,40,55 * * * * /usr/local/bin/php /var/www/vhosts/what/peerupdate.php SCHEDULE_KEY >> /root/peerupdate.log
* * * * * /usr/local/bin/indexer -c /etc/sphinx/sphinx.conf --rotate delta
5 0,12 * * * /usr/local/bin/indexer -c /etc/sphinx/sphinx.conf --rotate --all
2013-07-10 00:08:53 +00:00
7. You're probably going to want IP geolocation information, so first you need to fill in the geoip_country tables by visiting /tools.php?action=update_geoip
After that finishes parsing information from MaxMind, you may want to map users to countries by running:
"INSERT INTO users_geodistribution (Code, Users) SELECT g.Code, COUNT(u.ID) AS Users FROM geoip_country AS g JOIN users_main AS u ON INET_ATON(u.IP) BETWEEN g.StartIP AND g.EndIP WHERE u.Enabled = '1' GROUP BY g.Code ORDER BY Users DESC"
2011-03-28 14:21:28 +00:00
This will fill in the table needed for stats.
8. Start modifying stuff. Hopefully, everything will have gone smoothly so far and nothing will have exploded (ha ha ha)