devryan / GamePanelX-V3

The Original Free and Open Source Game Control Panel
https://www.gamepanelx.com
Other
131 stars 94 forks source link

Deploy Instructions #153

Open humm3r1 opened 7 years ago

humm3r1 commented 7 years ago

Hey there,

I love this gamepanel and can't come to terms with using anything else still. I found this many years ago when v3 first came out and have been using it ever since for my own servers. So just to show that it is still used by at least someone so you have a reason to continue the project, here is some documentation :)

I wanted to post something to contribute for documentation on setting this up and adding custom games since there isn't much documentation out there on this (as I found when I spent 2 weeks figuring this all out in 2016 again).

Here is how to set up GamePanel X with Apache on CentOS 6

This guide will show you how to install GamePanelX onto CentOS 6.7 and install custom games and cloud based games from the gamepanel cloud

CentOS VM setup

Begin by installing a CentOS 6 minimal VM and do all the yum updates.

GamePanel X Installation

For optimal performance and security, use 2+ VM’s for this. One VM for the master, one or more for running the game and / or voice servers.

Install Master Server

yum update -y sed -i 's/SELINUX=enabled/SELINUX=disabled/g' /etc/selinux/config setenforce 0 selinuxenabled 0 yum install -y httpd php php-mysql php-curl php-posix php-bcmath mysql mysql-server wget unzip glibc.i686 libstdc++.i686 libgcc_s.so.1 libgcc.i686

set IPTables for port 80 HTTP access

iptables -I INPUT 1 -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT service iptables save service httpd restart chkconfig httpd on

cd /var/www/html wget https://github.com/devryan/GamePanelX-V3/archive/master.zip unzip master.zip rm -f master.zip mv GamePanelX-V3-master games cd games mv configuration.new.php configuration.php chown apache: . -R service mysqld restart chkconfig mysqld on mysql_secure_installation use password: passwordofyourchoice mysql -uroot -p

Enter your root password now

create database gamepanelx; grant all on gamepanelx.* to 'gamepanelx'@'localhost' identified by 'passwordofyourchoice'; flush privileges; quit; run web installer at http://ipaddress/games/install use gamepanelx/passwordofyourchoise for SQL credentials. set an admin password for web GUI. remove files now: rm -fr /var/www/html/games/install Master server is up.

Install Remote Server

sed -i 's/SELINUX=enabled/SELINUX=disabled/g' /etc/selinux/config setenforce 0 selinuxenabled 0 yum install -y git wget mkdir GamePanelX-Remote cd GamePanelX-Remote git init git pull https://github.com/devryan/GamePanelX-V3-Remote.git sudo ./install.sh

Remote server is now up!

Install / upload games etc to: /var/www/html/gpx/uploads

Then we can make a template of it and deploy it as a game server!

Installing Custom Games (MOHAA) to Remote Server

Upload the game server directory (I downloaded mohaa-revival and just zipped the entire directory) to the uploads folder(/usr/local/gpx/MOHAA) Add the game to GamePanelX with all configurations:

image

image

chmod a+x mohaa_lnxded (NEEDED after uploading to /usr/local/gpx/uploads/MOHAA) Make the template, and select /usr/local/gpx/uploads/MOHAA (you would browse to uploads and MOHAA and select at the top to use this folder) Now try to deploy it to a server using Create Server on the left navigation, and use the template we picked. To upload a logo for MOHAA, upload to the master server under /var/www/html/games/images approximately. Look for the other PNG logo files, and use the same name as the Game we created earlier. Also be sure that you do the firewall rules up, script to come adding the rules and saving for MOHAA.

Teamspeak 3

TS3 is very similar to MOHAA. get the server zip for linux and upload it to uploads/TS3 folder

image

Under the Misc of settings, add ts3server.ini as config file (optional) value (but this is mandatory I believe)

Should be able to make the template and deploy a server now. It will say offline when it is running so check the console. I also had to do a chmod a+x at one point to make it start in the deployed directory, so if it has issues look into that. If it has problems making a directory for filetransfer, then make sure the ls -la permissions are consistently set to gpx and not root or something weird. That should be it. Check if it works or not.

devryan commented 7 years ago

Thanks for posting this! I will try and incorporate this into the main docs here.