#install the following packages on gnu/debian apt-get install mysql-server apt-get install php5 apt-get install apache2 apt-get install phpmyadmin /etc/init.d/apache2 restart #create a directory for scripts mkdir /usr/local/games/scripts/ ensure that /cstrk61/server.cfg has "log on" #download player stats script wget https://www.sendspace.com/pro/dl/ny8wcx #download images for stats page wget https://www.sendspace.com/pro/dl/w2154a #decompress files in .../games/scripts/ tar zxvf playerstats.tar.gz cd .../scripts/playerstats/ chmod +x makestats-b61.php csstats61.php edit $sql_user and $sql_pass in both files ln -s .../playerstats/csstats61.php /var/www/html/ touch last_file61 last_line61 #set up msyql database navigate to http://your.server.com/phpmyadmin/ login using mysql db root credentials download .../scripts/cs_61stats.sql home > databases > create new database > cs_61stats > create home > cs_61stats > import > choose file > cs_61stats.sql > go cd .../scripts/playerstats/ execute ./makestats-b61.php #fixes /phpmyadmin was not found error nano /etc/apache2/apache.conf Include /etc/phpmyadmin/apache.conf /etc/init.d/apache2 restart #add images for webpage tar zxvf imgstats.tar.gz mkdir /var/www/images/ #clean up log directory #!/bin/bash before=$(ls | wc -l) find . -type f '!' -exec grep -q "connected" {} \; -delete after=$(ls | wc -l) result=$(expr $before - $after) echo "There were $before files before delete." echo "There were $after files after delete." echo "There were $result files deleted." #prevent old logs from being overwritten cd /usr/local/games/halflife/hlds_l/cstrk61/logs for i in *; do mv "$i" 1_"$i"; done #correct log metadata sed -i 's/pattern1\*/pattern2/g' *.log & grep -rnw -e 'pattern1*'