Welcome to iChobots.net!


Building Chobots.net Tutorial

Localhost Edition:

Step 1: Download a source for free from our Create Private Server page, or if you already have one; you may continue to the next step.

Step 2: Go to the directory /home/, and make a folder named "localhost". Then go inside the folder you made.

Step 3: Upload the following files inside folder /home/localhost:
red5.zip
flex_3_sdk.zip
goverla.zip
source.zip

Step 4: Open the terminal, and type the following commands:
apt-get update
apt-get upgrade
apt-get install apache2
apt-get install php5
apt-get install php5-mysql
apt-get install mysql-server
apt-get install libapache2-mod-auth-mysql
apt-get install subversion libapache2-svn
apt-get install libapache2-mod-php5
apt-get install nano
apt-get install unzip
apt-get install zip

apt-get install ant
a2enmod php5
service apache2 restart
wget http://softlayer-dal.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.2.5/phpMyAdmin-4.2.5-all-languages.zip

Step 5: Unzip the following files inside folder /home/localhost:

red5.zip
flex_3_sdk.zip
goverla.zip
source.zip

Step 6: Once the files have been extracted go to /home/localhost/flex_3_sdk/bin/ and type the following commands:
chmod 777 fcsh
chmod 777 fcsh.exe

Step 7: Go to /home/localhost and then move folder goverla to the trunk folder (/home/localhost/trunk).

Step 8: Go to /home/localhost/trunk, then edit kavalok.properties. Replace the file with this code:
flex.sdk=/home/localhost/flex_3_sdk
flex.sdk.player=frameworks/libs/player
jre.dir=/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib

red5.dir=/home/localhost/red5

exe.extension=

deploy.flash.dir=/var/www/game

database.host=127.0.0.1
database.name=chobots
database.user=root
database.password=root

host.ip=127.0.0.1
host.address=127.0.0.1
instance.addresses=127.0.0.1
Your username may not be root, and your password probably isn't root, and your JRE directory may be different, so if it is make sure to edit it accordingly.

Step 9: Now go to /home/localhost/trunk/kavalok/src/, then edit Main.as. Anywhere where you see an IP address, replace it with 127.0.0.1.

Step 10: Go to /home/localhost/trunk/kavalok_admin/src/com/kavalok/admin/main/ and edit MainViewBase.as. Make sure to replace all IP addresses with 127.0.0.1.

Step 11: Open your browser of choice and go to 127.0.0.1/phpmyadmin, then create a database called "chobots" and import ChobotsDB.sql.

Step 12: Go to the table Server and replace the IP address with 127.0.0.1 that's before /kavalok.

Step 13: Before you build, you need to type the following commands:
apt-get install git
apt-get install git-core
git init

Step 13: Type the following commands (This may take some time):
cd /home/localhost/trunk
ant build-all
Congratulations, you've successfully built your Chobots if you don't have any errors.

Step 14: Now we will have to start the server, so type the following commands:
cd /home/localhost/red5
screen sh red5.sh

You can also make an easy script to do this for you. Here's what I did for my script:
echo "Starting Red5, please wait..."
cd localhost/red5
sh red5.sh

How to play your private server? Open your browser of choice, and go to 127.0.0.1/game/MainLoaderFullScreen.swf. Enjoy and have fun!

EXTRA (SECURITY):
Before you can secure things, you'll need to enable use of .htaccess files, so:

Step 1: Edit /etc/apache2/sites-available/default, then look for a section like this:
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/
        </Directory>
What you will have to do is change AllowOverride None to AllowOverride All, this tells Apache that using .htaccess files is OK.

Step 2: Restart Apache.

Step 3: Go to /var/www, and create a file named '.htaccess'.

Step 4: Copy and paste this code:
ErrorDocument 404 /index.html
ErrorDocument 403 /index.html
ErrorDocument 401 /index.html
Options -Indexes

AuthUserFile /home/localhost/.htpasswd
AuthName "Staff Only"
AuthType Basic
<Files "SpeakOfTheChobotDevilServiceAgent3.swf">
  require valid-user
</Files>

Step 5: Save it, then go to /home/localhost and create a file named '.htpasswd'.

Step 6: Go to http://www.htaccesstools.com/htpasswd-generator/ and choose the username and password you want for the panel.

Step 7: Copy and paste the code to the .htpasswd file and save it.

Congratulations, you've created and (not completely) secured your Chobots Private Server!
VPS Edition: