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
tar -zxvf rarlinux-x64-5.1.1.tar.gz
cd rar && cp rar unrar /bin

# Install unrar 32 bits
cd /tmp
tar -zxvf rarlinux-5.1.1.tar.gz
cd rar && cp rar unrar /bin

FTP Server installation.

# Download and Install proftpd
cd /tmp && wget
chmod +x

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

# Download ioncube 64 bits
cd /tmp
$ wget
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
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/ >> /etc/php5/cli/php.ini
echo zend_extension = /usr/local/ioncube/ >> /etc/php5/apache2/php.ini

Add shell nologin.

echo /sbin/nologin >> /etc/shells

Create SGM vhost in apache.

cd /etc/apache2/sites-enabled && wget
cd /etc/apache2/sites-available && wget
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 && unzip -o && rm -f

# If PHP Version >= 5.5
cd /usr/share && wget && unzip -o && rm -f

Create and edit SGM config.php file.

cd /usr/share/sgm
nano config.php

# Copy/paste the follwing content
$Server = 'ServerID';
$Key = 'Key';
$Remote = '';
$urlRemote = '';

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 && tar -zxvf structure.tar.gz && rm structure.tar.gz

# If PHP Version < 5.5
cd /home/SGM/tools && wget && unzip -o && rm -f

# IF PHP Version >= 5.5
cd /home/SGM/tools && wget && unzip -o && rm -f

Assign permissions to SGM folder.

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

Download SteamCMD.

cd /home/SGM/tools/steamcmd
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
Assistant (Views: 2603)
CentOS (Views: 3801)
Ubuntu (Views: 3266)

Powered by WHMCompleteSolution