RXL-Realms Community
Industria => Development => Servers => Topic started by: Mystera on January 18, 2024, 01:01:46 PM
-
tips:
#configure your centos through installation on static ip make sure to always configure it to manual
then add your ipv4 = the ip of your server subnetmask 255.255.255.0 and gateway to your router ip dns to 8.8.8.8 8.8.4.4
#to use vi text editir press I to insert and Shift + : then type x to save file or q to quit without saving!
#to change centos to static ip
vi /etc/sysconfig/network-scripts/ifcfg-eth0
sample:
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.1.44
NETMASK=255.255.255.0
## Configure Default Gateway
#
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.1.1
## Restart Network Interface
#
/etc/init.d/network restart
## Configure DNS Server
#
# vi /etc/resolv.conf
nameserver 8.8.8.8 # Replace with your nameserver ip
nameserver 192.168.1.1 # Replace with your nameserver ip
original post of changing centos to static ip here : https://gist.github.com/fernandoaleman/2172388 (https://gist.github.com/fernandoaleman/2172388)
1- Install linux libs
1.02.74-10.el6_3.3.x86_64 groff-1.18.1.4-21.el6.x86_64 device-mapper-event-1.02.74-10.el6_3.3.x86_64 selinux-policy-3.7.19-155.el6_3.14.noarch cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64 kernel-2.6.32-279.19.1.el6.x86_64 lvm2-2.02.95-10.el6_3.3.x86_64 epel-release-6-8.noarch gpg-pubkey-6b8d79e6-3f49313d libgpg-error-1.7-4.el6.x86_64 libgcc-4.4.6-4.el6.i686 glibc-common-2.12-1.80.el6_3.7.x86_64 unzip-6.0-1.el6.x86_64 p7zip-plugins-9.20.1-2.el6.x86_64 unrar-4.2.3-1.el6.rf.x86_64 fuse-libs-2.8.3-4.el6.x86_64 fipscheck-1.2.0-7.el6.x86_64 glibc-2.12-1.80.el6_3.7.i686 zlib-1.2.3-27.el6.i686 compat-libstdc++-33-3.2.3-69.el6.i686 nss-util-3.13.6-1.el6_3.x86_64 nss-3.13.6-2.el6_3.x86_64 kernel-2.6.32-279.22.1.el6.x86_64 tzdata-2012j-1.el6.noarch ntpdate-4.2.4p8-2.el6.centos.x86_64 bzip2-libs-1.0.5-7.el6_0.x86_64 perl-Pod-Escapes-1.04-127.el6.x86_64 libdrm-2.4.25-2.el6.x86_64 perl-version-0.77-127.el6.x86_64 perl-Module-Pluggable-3.90-127.el6.x86_64 perl-DBI-1.609-4.el6.x86_64 postfix-2.6.6-2.2.el6_1.x86_64 mysql-5.1.67-1.el6_3.x86_64 libcap-ng-0.6.4-3.el6_0.1.x86_64 lzo-2.03-3.1.el6.x86_64 python-pycurl-7.19.0-8.el6.x86_64 gnutls-2.8.5-4.el6_2.2.x86_64 openvpn-2.2.2-1.el6.rf.x86_64 cracklib-dicts-2.8.16-4.el6.x86_64 perl-URI-1.40-2.el6.noarch pciutils-3.1.4-11.el6.x86_64 perl-Compress-Raw-Zlib-2.020-127.el6.x86_64 perl-Compress-Zlib-2.020-127.el6.x86_64 passwd-0.77-4.el6_2.2.x86_64 perl-HTML-Parser-3.64-2.el6.x86_64 iptables-ipv6-1.4.7-5.1.el6_2.x86_64 perl-libwww-perl-5.833-2.el6.noarch perl-XML-RegExp-0.03-7.el6.noarch bash-4.1.2-9.el6_2.x86_64 curl-7.19.7-26.el6_2.4.x86_64 libgcrypt-1.4.5-9.el6_2.2.x86_64
most of them will work and rest won't this was taken from titan Battle of immortal install package script and i didn't bother to specify them but if anyone did that please post down here to update the thread
2- Fix epel repo
since epel repo the following command will solve the problem
sudo yum upgrade ca-certificates --disablerepo=epel
optional if you wish to clean yumyum clean all && yum makecache
3-Install pw server files
use winscp and upload the server files using stfp connection of centos to directory /home
use winscp to move all folders from /home/home to /home and del /home/home with winscp or command
rm -rf /home/home
apply the following commands
rm -rf /home/etc/hosts
cp -rf /home/etc /
cp -rf /home/libs /
cp -rf /home/libs /usr/
rm -rf /home/libs
4-Configuration
#change hosts file
vi /etc/hosts
# add those lines to hosts file
127.0.0.1 manager
127.0.0.1 aumanager
127.0.0.1 auth
127.0.0.1 audb
127.0.0.1 link1 link2 game1 game2 game3 game4 delivery database backup
127.0.0.1 gmserver.localdomain gmserver 127.0.0.1 bogon
# change your username to mysql username and password
vi /etc/table.xml
# change first 4 ip addresses '0.0.0.0' to your ip
vi /home/glinkd/gamesys.conf
5-fix problem with gacd on centos
here:http://forum.ragezone.com/f753/solved-centos-issue-gacd-libxml2-1128722/
6-servers to install
MYSQL
2 choices
1- if you want to run mysql server or having one already on different machine , windows for example
#this will install mysql client
then apply that command only
yum install mysql
Apache
2 choices as well
1- if you want to run apache server or having one already on different machine , windows for example
#then do nothing and depend only on apache server on windows
2- if you want to run it on the same hosting machine then
yum install httpd php
ALL
# this will install all on the same machine
sudo yum install httpd mysql-server php php-mysql
sudo service httpd start
sudo service mysqld start
sudo mysql_secure_installation
sudo yum install phpmyadmin
vi /etc/httpd/conf.d/phpMyAdmin.conf
example
. . .
Require ip your_workstation_IP_address
. . .
Allow from your_workstation_IP_address
. . .
Require ip your_workstation_IP_address
. . .
Allow from your_workstation_IP_address
. . .
follow this guide from original post here : https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-a-centos-6-4-vps (https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-a-centos-6-4-vps)
JAVA
#install java
yum install java-1.6.0-openjdk
JETTY
#follow this guide on these links
http://www.copper-arrow.com/blog/jetty-web-server-centos-6 (http://www.copper-arrow.com/blog/jetty-web-server-centos-6)
http://forum.ragezone.com/f695/install-pw-server-centos-788699/ (http://forum.ragezone.com/f695/install-pw-server-centos-788699/)
the last touches
1- add pw website to apache
cp -rf /home/var /
rm -rf /home/var
2- add pwadmin to jetty
cp -R adminer/ /opt/jetty/webapps/
cp -R pwAdmin/ /opt/jetty/webapps/
cp -R ROOT/ /opt/jetty/webapps/
3- edit server file
rm -rf /home/server
vi /home/server
#add the following on this new empty file
#!/bin/bash
ServerDir=home
GsLogFileDir=$ServerDir
GsLogFileName=GameService_Log
txtnrm='\e[0;0m' # Normal
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
Server::Start()
{
if [ ! -d /$ServerDir/logs/starting ]; then
mkdir /$ServerDir/logs/
mkdir /$ServerDir/logs/starting
fi
echo -e "=== [${txtred} START ${txtnrm}] Log Service ==="
cd /$ServerDir/logservice; ./logservice logservice.conf > /$ServerDir/logs/starting/logservice.log &
sleep 3
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Unique Name ==="
cd /$ServerDir/uniquenamed; ./uniquenamed gamesys.conf > /$ServerDir/logs/starting/uniquenamed.log &
sleep 3
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Auth ==="
cd /$ServerDir/auth/build; ./authd.sh start &
sleep 5
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Data Base ==="
cd /$ServerDir/gamedbd; ./gamedbd gamesys.conf > /$ServerDir/logs/starting/gamedbd.log &
sleep 10
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Anti Cheat ==="
cd /$ServerDir/gacd; ./gacd gamesys.conf > /$ServerDir/logs/starting/gacd.log &
sleep 5
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Faction ==="
cd /$ServerDir/gfactiond; ./gfactiond gamesys.conf > /$ServerDir/logs/starting/gfactiond.log &
sleep 7
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Delivery ==="
cd /$ServerDir/gdeliveryd; ./gdeliveryd gamesys.conf > /$ServerDir/logs/starting/gdeliveryd.log &
sleep 5
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Link ==="
cd /$ServerDir/glinkd; ./glinkd gamesys.conf 1 > /$ServerDir/logs/starting/glink.log &
cd /$ServerDir/glinkd; ./glinkd gamesys.conf 2 > /$ServerDir/logs/starting/glink2.log &
cd /$ServerDir/glinkd; ./glinkd gamesys.conf 3 > /$ServerDir/logs/starting/glink3.log &
cd /$ServerDir/glinkd; ./glinkd gamesys.conf 4 > /$ServerDir/logs/starting/glink4.log &
sleep 8
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
echo -e ""
echo -e "=== [${txtred} START ${txtnrm}] Game Service ==="
cd /home/gamed; ./gs is62 > /home/logs/is62.log &
cd /$ServerDir/gamed; ./gs gs01 > /$ServerDir/logs/starting/gs01.log &
sleep 30
echo -e "=== [${txtgrn} OK ${txtnrm}] ==="
}
Server::Stop()
{
echo -e "[${txtgrn} OK ${txtnrm}] Stop Log Service"
pkill -9 logservices
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Link"
pkill -9 glinkd
sleep 15
echo -e "[${txtgrn} OK ${txtnrm}] Stop Auth"
pkill -9 authd
sleep 3
echo -e "[${txtgrn} OK ${txtnrm}] Stop Delivery"
pkill -9 gdeliveryd
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Anti Cheat"
pkill -9 gacd
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Game Service"
pkill -9 gs
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Faction"
pkill -9 gfactiond
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Unique Name"
pkill -9 uniquenamed
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Data Base"
pkill -9 gamedbd
sleep 2
echo -e "[${txtgrn} OK ${txtnrm}] Stop Java"
pkill -9 java
sleep 3
}
PARAM_STR=$1
if [ -n "$PARAM_STR" ]; then
if [ "$PARAM_STR" == "start" ]; then
Server::Start
elif [ "$PARAM_STR" == "stop" ]; then
Server::Stop
elif [ "$PARAM_STR" == "restart" ]; then
Server::Stop
echo ""
Server::Start
elif [ "$PARAM_STR" == "getlog" ]; then
cd /$ServerDir/gamed; ./gs log > /$GsLogFileDir/$GsLogFileName.txt
echo -e "[${txtgrn} OK ${txtnrm}] Getting Logs. Path To Log File: /${GsLogFileDir}/${GsLogFileName}.txt"
fi;
fi;
exit 0
3-shut down firewall/iptables
/etc/init.d/iptables save
/etc/init.d/iptables stop
chkconfig iptables off
4- check website url http://yourserver'sip/ (http://yourserver'sip/)
5- to make server public port forward from router with 29000
as far as i know this server can be hosted on centos as well but i am receiving strange error
https://ibb.co/jqqcYv (https://ibb.co/jqqcYv)
all libs were installed but i am not sure what is the problem
Resolve with the following steps:
1- yum install libxml2
2- yum install libxml2.so.2