Had to flip through a couple posts on here and look for some stuff on the web to get up and running, so thought I'd try to make a single post for what I had to do to get up and running on a linux box.
First off, I'm no where close to a *nix guru of any sort. Using a linux box for our org bots and web pages was a first go at using linux for me. So, any corrections, simplifications, or helpful hints anyone has is appreciated.
Second, the box I installed on is runng Ubuntu, a flavor of Debian Linux. So, some commands may differen based on your version. But, hopefully this will be helpful.
Here we go:
1) Make sure you have php4-cli and php4-mysql installed
$ dpkg -l | grep php You want to see -
ii php4-cli 4.3.10-10ubunt command-line interpreter for the php4 script
ii php4-mysql 4.3.10-10ubunt MySQL module for php4
If you don't have either of them, install them
$ sudo apt-get install php4-cli
$ sudo apt-get install php4-mysql2) Make sure you have the mysql server installed
$ dpkg -l | grep mysql You want to see -
ii mysql-server-4 4.1.10a-2ubunt mysql database server binaries
If you don't have it, install it
$ sudo apt-get install mysql-server-4.13) Make sure you have unzip installed to unzip the files we download
$ dpkg -l | grep unzip You want to see -
ii unzip 5.51-2ubuntu1. De-archiver for .zip files
Otherwise install it
$ sudo apt-get install unzip4) Download the bebot files and the items db for it. Commands here are for the current link to v0.2.1.1 and items db for 15.8.4, the exact url may change, double check
Here first.
From the directory you want to install bebot in:
$ wget http://bebot.fieses.net/files/bebot_v0211.zip
$ wget http://bebot.fieses.net/files/items150804.zip Once the files are downloaded, unzip the main bot files
$ unzip bebot_v0211.zip Then, unzip the items database. When you get the warning about overwriting the file, allow it
$ unzip items150804.zip -d bebot5) Configure the mysql database
Log into mysql
$ mysql -u root Create the database. I called mine bebot (don't forget the semi-colon at the end of the line)
mysql> CREATE DATABASE bebot; Make the new database the one you're issuing commands to
mysql> USE bebot; Upload the items db file into the database.
I put my bebot directory in my home directory, so I used:
mysql> SOURCE /home/MyUserName/bebot/items.sql; You'll get a ton of lines updated messages, and then everything is loaded
Create a user in mysql that the bot can logon with
This command gives the user "bebot" access to all tables on database bebot
If they log in from the local host with the password 'bebotpassword'
Again, don't forget the semi-colon on the second line but not the first
mysql> GRANT ALL PRIVILEGES ON bebot.* TO 'bebot'@'localhost'
-> IDENTIFIED BY 'bebotpassword' WITH GRANT OPTION;6) Configure the bot's start.php file
Use vi or gedit, or what ever editor program you use to configure these two lines
The exact path to php may be slightly different for you
$php_bin = "/usr/bin/php";
$main_php = "./main.php";
7) Configure the Bot.conf file in the conf directory
Most everything in there has self-explanatory comments.
You can also look
Here for information on configuring it for a radibot, or
Here for a Guildbot
8) Configure the MySQL.conf file in the conf directory
If you used all of the examples above, word for word, it would look like this:
$dbase = "bebot";
$user = "bebot";
$pass = "bebotpassword";
$server = "localhost";
9) Start the bot to make sure it works
From the bebot directory:
$ php ./start.php10) If the bot loads, logs on, and everything is good, shut it down and finish up. If not, you'll have to do some troubleshooting
11) Mark or move modules you don't want the bot to load.
Look in the modules directory. Any modules you don't want to bot to use/load you can rename to start with a _
change Sever.php to _Server.php for example
Or, I created an "Unused" directory in the module directory and moved the unwanted ones there, so I don't have to even look at them
12) Download any additional modules you want to load
Look
Here to see what is available
13) ((Optional)) Rename start.php to RAIDBOT.php, or something more easily recognized.
I run the bot in the background, so to kill it from command line, have to grep the ps to get the pid
start.php seemed a bit generic to me, so I have it a name I can easily look for and certainly will not be used
by anything I load in the future.
14) Start the bot again
From the bebot directory:
$ php ./RAIDBOT.php 15) If you get errors, go back and troubleshoot the modules, since you got it to work correctly earlier. If it loads, you can kill it one last time and use this command to run it in the background and continue running even after you log off your sever:
$ nohup php ./RAIDBOT.php &16) Set up the Bot members
If you're running a raid bot, Bot Admin does not equal bot member, so:
Log onto the game with whoever you made bot admin
"/tell BotName !member YourName"
You can then add other members, andmins, and such manually
If you're running a guild bot, once it starts up, it takes a couple minutes to get all the data from
funcom's site, and then you should be good.