Knowledgebase

Debian

Add to Favourites     Print this Article

Debian is an operating system composed primarily of free and open-source software, most of which is under the GNU General Public License, and developed by a group of individuals known as the Debian project. Debian is one of the most popular Linux distributions for personal computers and network servers, and has been used as a base for several other Linux distributions.


This article explains how to configure a server in order to be ready to communicate with the speed-gm panel, based on some very useful pre-made ​​code to those who have not mastered completely linux systems.
More advanced users can adjust what they wish and also use our support system to reach us.

 

Add remote box to SGM

  • On SGM navigate to System -> Boxes -> New Box

 

Remote Server Configuration

Run the following commands on the server. If the system is 64bit we should add support to 32-bit in order to support some games and steamCMD.

# Add ia32 shared libraries
​dpkg --add-architecture i386
apt-get -y update
apt-get -y install ia32-libs

# Install dependencies 
apt-get -y install sudo wget debconf-utils apache2 php5 php5-curl php5-sqlite expect screen dos2unix sudo unzip sysstat zip telnet

Choose one of the next two, depending on your operating system.

# Install unrar 64 bits
cd /tmp && wget http://www.rarlab.com/rar/rarlinux-x64-5.1.1.tar.gz
tar -zxvf rarlinux-x64-5.1.1.tar.gz
cd rar && cp rar unrar /bin

# Install unrar 32 bits
cd /tmp
wget http://www.rarlab.com/rar/rarlinux-5.1.1.tar.gz
tar -zxvf rarlinux-5.1.1.tar.gz
cd rar && cp rar unrar /bin

FTP Server installation.

# Download and Install proftpd
cd /tmp && wget http://install.speed-gm.com/proftpd/debian/proftp.sh
chmod +x proftp.sh
./proftp.sh
rm proftp.sh

Choose one of the next two, depending on your operating system.

# Download ioncube 64 bits
cd /tmp
$ wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
mkdir /usr/local/ioncube
cd ioncube && mv * /usr/local/ioncube

# Download ioncube 32 bits
cd /tmp
$ wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar -zxvf ioncube_loaders_lin_x86.tar.gz
mkdir /usr/local/ioncube
cd ioncube && mv * /usr/local/ioncube

Install ioncube.

# Identify version of php to activate the correct loader. 5.2, 5.3, 5.4, 5.6, etc
php -v 
# Add ioncube to php
echo zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.6.so >> /etc/php5/cli/php.ini
echo zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.6.so >> /etc/php5/apache2/php.ini

Add shell nologin.

echo /sbin/nologin >> /etc/shells

Create SGM vhost in apache.

cd /etc/apache2/sites-enabled && wget http://install.speed-gm.com/vhost/debian/sgm
cd /etc/apache2/sites-available && wget http://install.speed-gm.com/vhost/debian/sgm
mv /etc/apache2/sites-enabled/sgm /etc/apache2/sites-enabled/sgm.conf

Create the SGM public folder.

mkdir /usr/share/sgm

Download the remote web files.

# If PHP Version < 5.5
cd /usr/share && wget http://install.speed-gm.com/remote/5/sgm.zip && unzip -o sgm.zip && rm -f sgm.zip

# If PHP Version >= 5.5
cd /usr/share && wget http://install.speed-gm.com/remote/55/sgm.zip && unzip -o sgm.zip && rm -f sgm.zip

Create and edit SGM config.php file.

cd /usr/share/sgm
nano config.php

# Copy/paste the follwing content
<?php
$Server = 'ServerID';
$Key = 'Key';
$Remote = 'innov4web.pt';
$urlRemote = 'http://your_url.speed-gm.com';

Change the 'ServerID', 'Key' and 'your_url' for the values that ​​are presented in the Edit box menu of your Box.

The result will be something like this.


 

Assign permissions.

cd /usr/share/sgm
chown -R root:root *
chmod 644 index.php && chmod 644 dn.php

Download SGM main folder .

cd /home && wget http://install.speed-gm.com/structure.tar.gz && tar -zxvf structure.tar.gz && rm structure.tar.gz

# If PHP Version < 5.5
cd /home/SGM/tools && wget http://install.speed-gm.com/remote/5/scripts.zip && unzip -o scripts.zip && rm -f scripts.zip

# IF PHP Version >= 5.5
cd /home/SGM/tools && wget http://install.speed-gm.com/remote/55/scripts.zip && unzip -o scripts.zip && rm -f scripts.zip

Assign permissions to SGM folder.

cd /home
chown -R root:root SGM
cd /home/SGM/tools/scripts
chmod +x run.php
chmod +x socket.sh
chmod +x socket.php
chmod +x chpasswd

Download SteamCMD.

cd /home/SGM/tools/steamcmd
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar -zxvf steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gz

Configure Cron.

# Open crontab edit mode
crontab -e
# Add the following
* * * * * cd /home/SGM/tools/scripts && php run.php

Restart apache.

/etc/init.d/apache2 restart

Wait a moment and you can confirm the box status on the panel as Online.

Change the status of the box to Enabled in the Edit box menu in order to support game and voice servers installation.

Enable the main IP or add a secondary Ip to install the game servers.

 

Save FTP settings in order to update the configuration file in the remote Box

  • On SGM navigate to Settings -> FTP -> Save

 

 

Finally, SGM gives you the choise of which games you wish to run on a specific box.
Check this document to learn how to enable/disable games on a specific box.

 



Also Read
Ubuntu (Views: 5584)
Assistant (Views: 3938)
CentOS (Views: 5237)

Powered by WHMCompleteSolution