Click image for larger version.   Name: 7.png  Views: 731  Size: 199.7 KB  ID: 153239
7. Configure the OS to your liking and restart if prompted.

Click image for larger version.   Name: 8.jpg  Views: 760  Size: 39.3 KB  ID: 153990
8. Once landed on this boring black and white screen go type
Code:
ifconfig
to see if your eth0 is present - if not type
Code:
ifup eth0
to get an IP address.

Click image for larger version.   Name: 9.jpg  Views: 884  Size: 60.5 KB  ID: 153991
9. Once you know the IP address go start SecureCRT and connect to your server.

Click image for larger version.   Name: 10.jpg  Views: 765  Size: 74.9 KB  ID: 153992
10. Now type the necessary commands to install PostGreSQL and all needed assets:

Note: To paste in SecureCRT use Shift+ Insert. Also accept all questions if asked.

To install PostGreSQL
1.
Code:
yum install http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
2.
Code:
yum install postgresql93-server postgresql93-contrib
Note: You can install any version of PostGreSQL as long as it's not going below 9.x.

...now back to the steps

Click image for larger version.   Name: 11.jpg  Views: 669  Size: 40.5 KB  ID: 153993
11. Open up WinSCP and connect to your server and navigate to your root folder.
From there chmod the folder by right clicking the folder and properties. Change the permission to 777.

12. Navigate to var/lib/psql/9.3/data and find pg_hba.conf and postgresql.conf and open them up.

In pga_hba.conf find and edit according to your needs:
Code:
# TYPE  DATABASE        USER            ADDRESS                 METHOD


# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             0.0.0.0/0            md5
# IPv6 local connections:
host    all             all             ::1/128                 ident
Note: 0.0.0.0 means all IP's are accepted. To limit it set it to your IP following with
Code:
/32
.

Now to postgresql.conf:
Remove the hash tag of
Code:
#listen_addresses
and edit it to:
Code:
listen_addresses='*'
like so:
Code:
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------


# - Connection Settings -


listen_addresses = '*'        # what IP address(es) to listen on;
...save them both and type
Code:
service postgresql-9.3 initdb
and
Code:
service postgresql-9.3 start
afterwards.

13. Back to Winscp, copy all the server files in a directory in
Code:
/root
and make sure to give it a permission of 777. Right click on the folder and write 777 in the octal textbox otherwise type
Code:
chmod /root 777 -R
in SecureCRT. -R means recursive which sets all the files's permission underneath the folder of root to 777.

Time to create a database user
14. Go back to SecureCRT and type
Code:
sudo -u postgres createuser --superuser <username>
to create a new PostGreSQL super user. It's not required as you can use the default user "postgres". It's up to you. Just make sure to set a password. Do so by typing
Code:
alter user <username> password '<password>';
. You must remember to use the ' in the password to let it know it's a string.

15. Now type
Code:
su postgres
then
Code:
psql
when the 'bash' comes.

16. Create the necessary databases and give them a name of your choice. To create a database type
Code:
create database <database name> encoding 'SQL_ASCII' template template0;
. You must end a PostGreSQL command with a ';' otherwise nothing will happen. To import a SQL first connect to the database by typing
 
\c <database>
then
 
\i '<path to file>';
.
Caution: You must have the encoding in order to make the database read chinese letters otherwise the server won't let you in. The encoding is case-sensitive as well so make sure you type it as shown. Template is making sure that you can use a custom template of the database creation. Template0 means custom. No further explanation from here.

17. Once done go to Navicat and open up the game- and login server database.
In the game server database find the 'serverstatus' table and edit the IP's to your server's. Do so as well with login server database's 'worlds' table.

18. Open up the start file and replace the paths accordingly so they match yours.

19. Start your server by typing
Code:
./start
and you're done!