PsychoStats Gentoo Installation
From PsychoWiki
Contents |
[edit] NOTE
This Guide is incomplete and will be finished when PsyschoStats 3 is released I have time to see what other steps need to be added.
[edit] Introduction
This Guide is for installing PsychoStats onto a Gentoo Linux box specifically. Some commands and files structures will differ from other distros or flavors of linux. This Guide also assumes you have root access onto a Gentoo box. It is possible to do the install without root just you are at the mercy of the administrators of the box to have the proper modules installed.
[edit] Setting Up the Prerequisites
[edit] Setting Key Server Variables
- Edit /etc/make.conf
- USE="apache2 mysql", if USE variable already exist, just append it to include these 2 options.
- Edit /etc/portage/package.use
- dev-lang/php dba gd pcre session cli cgi expat zlib xml ctype curl xmlrpc unicode sqlite ftp gmp sockets bzip2 zip xpm
If you would like to keep php at php4 this step needs to be done
- Edit /etc/portage/package.mask
- >=dev-lang/php-5
[edit] Installing Programs
- Installing required programs
emerge --sync fixpackages emerge -u portage emerge -uDN world emerge php mysql apache DBI openssl vixie-cron DBD-mysql
[edit] Activating Programs
[edit] Apache
- Edit /etc/conf.d/apache2
- APACHE2_OPTS="-D PHP4 -D SSL"
/etc/init.d/apache2 start rc-update add apache2 default
[edit] MySQL
- MySQL
mysql_install_db
/etc/init.d/mysql start
mysql -u root
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('somepassword');
CREATE DATABASE stats;
GRANT ALL ON stats.* TO 'statsuser'@'localhost';
SET PASSWORD FOR 'statsuser'@'localhost'=PASSWORD('statspassword');
exit
rc-update add mysql default
[edit] Cron
- Cron
/etc/init.d/vixie-cron start rc-update add vixie-cron default
[edit] Installing PsychoStats
- Setting up the Tree
mkdir /usr/psychostats cd /usr/psychostats wget http://psychostats.com/downloads/PsychoStats/newest/linux/download.tar.gz tar -zxvf download.tar.gz cp -r psychostats*/* . && rm -rf psychostats* mv upload/ /var/www/localhost/htdocs/stats chown -R apache:apache /var/www/localhost/htdocs/stats
- Edit /usr/psyschostats/stats.cfg
- dbtype=mysql
- dbhost=localhost
- dbport=3306
- dbname=stats
- dbuser=statsuser
- dbpass=statspassword
- dbtblprefix=ps_
- Installing the Database
- In a Web Browsers goto http://yourIP/stats/install
Use the installation guide to go though the rest of the install
- Using Cron
echo "*/30 * * * * root /usr/psychostats/stats.pl -q" >> /etc/crontab