Own Server Compile from scratch [Volume 1]


Description

Note: Here you can see, how you can set up a clean Linux Server from scratch to compile a own WoW-Trinity Server. Its only the first part. If you use copy and paste, just use the contet between <...>, and paste it without <> in your terminal. In the next Volume i will show you, how you set up the Database, how to update them via sql.

/*
Install a WoW Server on Linux (Debian 8.0) from scratch
Wrote by Basto, after the 6th reinstall! (Server raid)
You are allowed to share this with credits
*/
_____________________________________________________

-First of all:
<apt-get update>
<apt-get upgrade>
<apt-get install>
# You can do this always. So you keep your Server up to date
_____________________________________________________

-Secuity#1:
#Change default User-Root-Password
<passwd "Username">
# Enter password two times
#Add new User for more security
<adduser "Username">
# Enter password two times
_____________________________________________________

-Security#2:
#SSH default Port change. Set the port new. Example 9988
<nano /etc/ssh/sshd_config>
#SSH Root Login denied. Note: Now you have to login with your new Username. When you have something to install, switch on the SSH window the username to root with [su <User>]. The intention about this is, nobody can hack you with the always known username "root"
<nano /etc/ssh/sshd_config>
#Change the row from (Yes - to no). You can use STRG + W (left klick to paste your searching copy to find it). CTRL + O = Save CTRL + X = Exit
"PermitRootLogin yes" to
"PermitRootLogin no"
</etc/init.d/ssh restart>
_____________________________________________________

-General Settings & install:
<apt-get install screen>
# See also "Screening for Idiots"
<apt-get install mysql-server>
# See also "MySQL Configs to reaching from outside"
_____________________________________________________

-Ground Server Install:
<apt-get install build-essential autoconf libtool gcc g++ make cmake git-core wget p7zip-full libncurses5-dev zlib1g-dev libbz2-dev>
# Accept
<apt-get install openssl libssl-dev mysql-server mysql-client libmysqlclient-dev libmysql++-dev libreadline6-dev>
<apt-get install libboost-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-iostreams-dev>
# Accept
_____________________________________________________

-Core Set-up:
<adduser "username">
# We also use here a new Username for more security. For example; wow
<su "username">
<git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git>
# This task will load the need things
<cd TrinityCore>
# Move to the Folder TrinityCore
<mkdir build>
# Build the folder build
<cd build>
# we move into build...
_____________________________________________________
# !Hold on and read first!
# To configure the core, we use space-separated parameters attached to the configuration-tool (cmake) - do read the entire section before even starting on the configuration-part.
# See also <Parameters> further down

_____________________________________________________
<cmake ../ [additional parameters]>
# Examples:
<cmake ../ -DCMAKE_INSTALL_PREFIX=/home/<username>/server -DWITH_WARNINGS=1>
# or
<cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server -DCONF_DIR=/home/wow/server/etc -DTOOLS=1 -DWITH_WARNINGS=1>
<make -j "number of cores">
# This will take now a little bit of your time. Caused by your core volume
<make install>
# Finished. Next: Database

_____________________________________________________
<<<Parameters:>>>
-DSCRIPTS * Build core with scripts included (enabled by default) *
-DSERVERS * Build worldserver and authserver (enabled by default)*
-DCMAKE_INSTALL_PREFIX Set installation directory

-DTOOLS Build map/vmap extraction/assembler tools -DTOOLS=1 (will include tools (and connection_patcher on 6.x))

-DWITH_WARNINGS Show all warnings during compile (advanced users only)

-DCMAKE_C_FLAGS Set C_FLAGS for compile (advanced users only)
-DCMAKE_CXX_FLAGS Set CXX_FLAGS for compile (advanced users only)
-DUSE_COREPCH * Use precompiled headers when compiling servers * (advanced users only)
-DUSE_SCRIPTPCH * Use precompiled headers when compiling scripts * (advanced users only)

-DWITH_COREDEBUG Include additional debug-code in core (advanced users only)
-DCONF_DIR Set configuration directory (advanced users only)
-DLIBSDIR Set library directory (advanced users only)
_____________________________________________________

-Screening for idiots:
<screen -ls>
# Look wich screen is atm running
<screen -S world>
<cd /home/<Username>/server/bin>
<./worldserver> or <sh worldrestart.sh>

<ctrl + A + D>
# for close

<screen -S auth>
<cd /home/<Username>/server/bin>
<./authserver>
_____________________________________________________

-MySQL Configs:
<apt-get install mysql-server>
# Accept and give the local user "root" a passowrd
<nano /etc/mysql/my.cnf>
# Edit: Topic MySQL -> [Port = 3306] to a own port (Attention, there are two ports,
look at the right head-topic. Its also for security) and [bind-address = 0.0.0.0]
</etc/init.d/mysql restart>
#Now let create us a Username
<mysql -p> 
<"Password who you set at beginning">
<CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';>
# Example: 'basto'@'%' IDENTIFIED BY '123'          % = means from outside
<GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';>
# ...On *. * TO means wich database and so on
<Exit>
_____________________________________________________

-Patching the DB:
<mysql -p>
<"Password">
<use "Datenbasename";>
<source "PathToData";>
_____________________________________________________

-Keep the Core Up-To-Date:
<cd ~/TrinityCore/>
#For 3.3.5 Branch
<git pull origin 3.3.5>
_____________________________________________________



#Note: 
#Feel free for feedback or if you have some other ideas
#Feel also free, to help to complete it. For the basics. For more transparence. To get more people in the community

#Edit1:
# Forgott a important " ; "



Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now