Some of this is missing from the install documentation so I though I would post it.
Installing php:
# echo "dev-lang/php sockets curl mysql bcmath" >> /etc/portage/package.use
# emerge php
Installing mysql:
# emerge mysql
Set the mysql root password using
# emerge --config =dev-db/mysql-[version]
# mysql -u root -p
Proceed with the mysql setup directions provided in the bebot documentation.
Starting the bot:
# cd /<whatever directory bebot was extracted to>
$ php StartBot.php
If you want to have bebot started automatically create the following files:
#!/sbin/runscript
# /etc/init.d/bebot
# $Header: $
depend() {
use net
need mysql
}
start() {
ebegin "Starting bebot"
#
start-stop-daemon --background --start --pidfile /tmp/bebot.pid --make-pidfile -c ${BEBOT_USER} --exec /bin/bebot
sleep 5
eend $? "Failed to start bebot"
}
stop() {
ebegin "Stopping bebot"
start-stop-daemon -v --stop --pidfile /tmp/bebot.pid
sleep 5
eend $? "Failed to stop bebot"
}
#/etc/conf.d/bebot
BEBOT_USER="name of user you want to run bebot as"
#!/bin/bash
cd /<whatever directory bebot was extracted to>
php StartBot.php
# Optionally start more bots:
# cd /<other bebot directory>
# php StartBot.php
# chmod +x /bin/bebot
# chmod +x /etc/init.d/bebot
# rc-update add bebot default
# /etc/init.d/bebot start