Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <h1>eBot installation instructions</h1>
- <i>
- These instructions are written for Ubuntu 14.<br>
- It might be possible to use these instructions on other Linux distribution and with some googling you could also use these for windows. <br>
- Altough the commands would be different and there might be different software needed.
- </i>
- <ul style="list-style-type:none">
- <li>
- <h2>eBot part</h2>
- <i>the eBot part is responsible for the communication with the database, the csgo server and the website.</i><br>
- <ul style="list-style-type:none">
- <li>
- <h3>first</h3>
- <p>apt-get update
- apt-get install autoconf
- apt-get install gcc
- apt-get install libcurl4-openssl-dev pkg-config
- apt-get install libxml2-dev
- apt-get install libbz2
- apt-get install libbz2-dev
- apt-get install libpng-dev</p>
- <h3>php</h3>
- <ol>
- <li>
- Check your php build options:
- <ol>
- <li>
- <b>"php -i | grep enable-maintainer-zts".</b>
- </li>
- <li>
- if there's a line like this in the output <b>"Configure Command => './configure' '--with-config-file-path=/etc/php5/apache2' '--with-pear=/usr/share/php' '--with-bz2' '--with-curl' '--with-gd' '--enable-calendar' '--enable-mbstring' '--enable-bcmath' '--enable-sockets' '--with-libxml-dir=/usr' '--with-mysqli' '--with-mysql' '--with-openssl' '--with-regex=php' '--with-zlib' '--enable-debug' '--enable-maintainer-zts'
- "</b> you can continue to the next step otherwise read the part about recompiling php.
- </li>
- </ol>
- </li>
- <li>
- Install pthreads:
- <ol>
- <li>
- <b>"pecl install pthreads"</b>
- </li>
- <li>
- Find your php configuration file<br>
- <b>"php -i | grep Loaded"</b><br>
- and look for the line "Loaded Configuration File => "
- </li>
- <li>
- Add the extensioin to the configuration to config file:<br>
- <b>"echo extension=pthreads.so" >> [the location of your php configuration file ex:(/etc/php.ini)]"</b>
- </li>
- <li>
- Reboot your pc<br>
- <b>"reboot"</b>
- </li>
- <li>
- Check if pthread is installed correctly:<br>
- <b>"php -m | grep pthreads"</b>
- </li>
- </ol>
- </li>
- </ol>
- recompiling php(only if step 1 failed)
- <ol>
- <li>
- Make the php folder:
- <ol>
- <li>
- <b>"mkdir /var/php"</b>
- </li>
- <li>
- <b>"cd /var/php"</b>
- </li>
- </ol>
- </li>
- <li>
- Download the latest php source code:<br>
- <ol>
- <li>
- <b>"wget http://www.php.net/distributions/php-<version>.tar.gz"</b><br>
- (ex: wget http://www.php.net/distributions/php-5.5.8.tar.gz )
- </li>
- <li>
- <b>"tar -zxvf php-<version>.tar.gz"</b><br>
- </li>
- <li>
- <b>"cd php-<version>"</b>
- </li>
- </ol>
- </li>
- <li>
- run the configure command to configure the make file<br>
- <b>"./configure --with-config-file-path=/etc/php5/apache2 --with-pear=/usr/share/php --with-bz2 --with-curl --with-gd --enable-calendar --enable-mbstring --enable-bcmath --enable-sockets --with-libxml-dir=/usr --with-mysqli --with-mysql --with-openssl --with-regex=php --with-zlib --enable-debug --enable-maintainer-zts "</b>
- </li>
- <li>
- Compile php:<br>
- <b>"make"</b>
- </li>
- <li>
- Test the compiled version:<br>
- <b>"make test"</b>
- </li>
- <li>
- Install your new compiled php version<br>
- <b>"make install"</b>
- </li>
- <li>
- Test if the php version is installed correctly<br>
- <b>"php -v"</b> Check if the built time is now
- </li>
- </ol>
- </li>
- <li>
- <h3>nodeJs</h3>
- Install nodeJs:
- <ol>
- <li>
- <b>"apt-get install nodejs"</b>
- </li>
- <li>
- <b>"apt-get install npm"</b>
- </li>
- <li>
- <b>"npm install archiver formidable socket.io"</b>
- </li>
- </ol>
- </li>
- </ol>
- </li>
- <li>
- <h3>Get the eBot </h3>
- <li>
- Make the eBot folder:
- <ol>
- <li>
- <b>"mkdir /var/eBotv3"</b>
- </li>
- <li>
- <b>"cd /var/eBotv3"</b>
- </li>
- </ol>
- </li>
- <li>
- Download the latest eBot version from github <br>
- <b>"wget https://github.com/deStrO/eBot-CSGO/archive/threads.zip"</b>
- </li>
- <li>
- Unzip the file: <br>
- <b>"unzip eBot-CSGO-threads.zip -d /var/eBotv3"</b>
- </li>
- </ol>
- </li>
- <li>
- <h3>Composer</h3>
- Install composer:
- <b>"php -r "readfile('https://getcomposer.org/installer');" | php"</b>
- </li>
- <li>
- <h3>Install the eBot</h3>
- <ol>
- <li>
- Install the bot:<br>
- <b>"php composer.phar install"</b>
- </li>
- <li>
- Configure the bot:<br>
- edit the bot ip in the config file: config/config.ini<br>
- make sure the bot ip is the same as your external ip.<br>
- you can find yours at <a href="http://www.whatsmyip.org/">http://www.whatsmyip.org/</a><br>
- </li>
- <li>
- Test if everything is working alright<br>
- <b>"php bootstrap.php"</b>
- </li>
- </ol>
- </li>
- <li>
- <h3>extra backup security</h3>
- <i>
- the website part tends to crash sometimes<br>
- so i've developed a script that checks if the bot is still running and if not it starts it again<br>
- the installation of this is not necessary
- </i>
- <ol>
- <li>
- make the script:<br>
- <b>"touch /var/eBotv3/eBotScript.sh"</b>
- </li>
- <li>
- make sure the script is executable:<br>
- <b>"chmod +x /var/eBotv3/eBotScript.sh"</b>
- </li>
- <li>
- add the script to the file:<br>
- paste this in the file<br>
- <i>
- #!/bin/bash<br>
- pidof php /var/eBotv3/bootstrap.php >/dev/null<br>
- if [[ $? -ne 0 ]] ; then<br>
- echo "Restarting eBot bootstrap.php: $(date)" >> /var/log/eBotServer.log<br>
- pkill node<br>
- screen -dmS ebotv3 php /var/eBotv3/bootstrap.php &<br>
- fi<br>
- sleep 1<br>
- pidof node /var/eBotv3/websocket_server.js 192.210.137.227 12360 >/dev/null<br>
- if [[ $? -ne 0 ]] ; then<br>
- echo "Restarting eBot websocket: $(date)" >> /var/log/eBotServer.log<br>
- screen -dmS websocket node /var/eBotv3/websocket_server.js 192.210.137.227 12360 & <br>
- fi<br>
- </i>
- </li>
- <li>
- Let it execute every minute:<br>
- <b>"(crontab -l ; echo "*/1 * * * * /var/eBotv3/eBotScript.sh")| crontab -"</b>
- </li>
- </ol>
- </li>
- </ul>
- </li>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement