Welcome to AC Web.
Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    K A P P A L O U N G E

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    2,451

    Post Linux Tutorial for beginners - Setup your Linux and TrinityCore from scratch - Part 2


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Part 1
    Part 3
    2.4 Setup Git

    After we have changed the SSH and MySQL Port, we can Setup Git and also the last step before we are going to add the User for Compiling and Running the Server.

    So we enter apt-get install -y git into PuTTy



    After that, we need to do some Git Configuration. We add an Username and Email for this Git per entering the following into PuTTy

    Replace the lightblue stuff with your infos (does not require an github user)

    git config --global user.name "Enter Username"
    git config --global user.email "Enter EMail Address"

    ______________________________________________

    2.5 Setup User

    The last Step before the generating and compiling begins is adding a new user for all of this. We have neither an existing one, netiher an folder where to actually start working. So we make use of the command useradd and add a few parameters.

    -m to create the homedirectory
    -s bash
    (note: to find out what to enter here, you need to enter which bash into PuTTy and copy the path)
    -d to set homedirectory on login

    REPLACE THE LIGHTBLUE STUFF WITH YOUR INFO

    useradd -m -s /bin/bash -d /username/ username

    After that, we setting a password for the User we just created, in my case it was acweb. We run passwd username


    ______________________________________________

    3 Setup TrinityCore

    So we are now going to reboot our system once since we have done alot of installations and changes of ports. So we run reboot into PuTTy and close it, waiting till the VPS comes back up.


    Once the VPS is back available, open PuTTy and login with the new created user.


    ______________________________________________

    3.1 Clone the newest TrinityCore

    So we are now logged in with our server-user. Let us begin with downloading the newest 3.3.5a TrinityCore. We Execute git clone -b3.3.5 git://github.com/TrinityCore/TrinityCore.git src into PuTTy.


    ______________________________________________


    3.2 Merge with ElunaLuaEngine (optional)

    We do now own the Newest TrinityCore 3.3.5a Sourcecode. If you want to use Lua within your TrinityCore, we need to execute cd src into PuTTy to enter the src folder where all the trinitycore files are placed and then we need to run
    git pull --recurse-submodules git://github.com/ElunaLuaEngine/ElunaTrinityWotlk.git

    Something like this should come up

    Go all the way down with your arrow down button and enter an message, im used to acwebtutorial


    Press CTRL+X to exit. Now you are getting asked to save changes.
    Enter Y to continue and again press <Enter> after that.

    Something like that should you see now after its finished


    Now we only run git submodule init && git submodule update into PuTTy and we are finished with merging.


    ______________________________________________

    3.3 Cmake

    Now we can run cmake to run the generation of the compileable files.
    We are visiting back our homedirectory per running cd per PuTTy
    Now we are going to create a new directory for our cmake step. We are going to run mkdir cmake in PuTTy.
    To Check if the Directory was created, run ls and seek out for it.
    Now we are going to enter the cmake folder by entering cd cmake into PuTTy.

    To run cmake, simply enter cmake into PuTTy to run it, but we need to add a few additional parameters.
    I am going to use the followings:
    source/path
    -DCMAKE_INSTALL_PREFIX
    -DTOOLS
    -DUSE_COREPCH
    -DUSE_SCRIPTPCH

    For those who need Warnings and Debug also need those:
    -DWITH_WARNINGS
    -DWITH_COREDEBUG


    REPLACE THE LIGHTBLUE STUFF WITH YOUR INFO

    For example (normal)

    cmake ../src -DCMAKE_INSTALL_PREFIX=/username/run -DTOOLS=1 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1

    For example (debug)

    cmake ../src -DCMAKE_INSTALL_PREFIX=/username/run -DTOOLS=1 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DWITH_WARNINGS=1 -DWITH_COREDEBUG=1
    You should see something like this now


    ______________________________________________

    3.4 Compiling and Installing

    Our TrinityCore is now ready to be compiled. We can do that per using the command make and the install command

    Depending on how much CPU Cores you have, you can add -j X to the make command as parameter.
    For Example in my case:

    make -j 6 && make install
    It should start compiling. Now you wait till it reached 100% and till it has installed the server binaries to the install_prefix we set before in cmake.


    Depending on your Hosting Specs, it can take a while since the Precompiled Headers are included, any further on re-compile for example when adding a Script will be alot faster.

    ______________________________________________

    3.5 Configuration

    Our TrinityCore is now Compiled and Installed, we can now move to the configs folder and remove the .dist per again visit the homedirectory per cd and then execute cd /run/etc in PuTTy.


    After that we are going to run the following 2 commands:
    cp authserver.conf.dist authserver.conf && cp worldserver.conf.dist worldserver.conf
    rm authserver.conf.dist && rm worldserver.conf.dist


    to copy the existing files without the .dist and delete the files with .dist after that.
    as soon as we only have authserver.conf and worldserver.conf in our folder (check it per using ls) we need to give those files some permissions per running chmod 777 authserver.conf && chmod 777 worldserver.conf in PuTTy


    Now we are going to Open WinSCP and Connect with the root user to the Linux System. Follow the path -> ../username/run/etc where the configs are placed.


    Open them by Selecting both with your mouse and hit <Enter>

    First thing we are going to change is the ListenPort and the PID File.
    Choose any Port from 1-65500


    The next thing is changing the MySQL Port from 3306 to our new Port.


    Now we are going to open the worldserver.conf and also edit a few things first.
    We are adding an external folder for dbc,maps,vmaps,mmaps for better overview of things.
    We set binary folder to logfolder and change the MySQL and Worldserver Port (Choose any Port from 1-65500)
    We also enable mmaps and pid for the worldserver, and disable updates






    After that, go into your binary folder with cd ../bin && mkdir bin

    Now you need to upload DBC, Maps, vmaps and MMaps. You can do that per Uploading your World of Warcraft 3.3.5a Client to the VPS/Dedi and move the tools from your binary folder into your Client folder and let run the extraction local on your Host or downloading them somewhere on the Internet and Upload them to your Binary folder.

    Your Folder structure should now look like this within /username/bin/bin:




    ______________________________________________

    3.6 Setup of iptables

    TrinityCore is now Configured and all ports are set. lets setup iptables and allow the ports we need.
    We open another PuTTy Session and login with the root user and run apt-get install iptables, after that we forward all ports with this command.

    iptables -A INPUT -i eth0 -p tcp -m tcp --dport PORTNUMBER -j ACCEPT

    Run it multible times with your SSH, MySQL, AuthserverListen, WorldServer Port.

    In my case

    Part 1
    Part 3
    Last edited by Psykko; 01-12-2017 at 07:23 PM.

  2. #2
    Here's some rather minor suggestions for the tutorial

    Section 2.5
    I suggest adding the -U option to the useradd command as this will create a group with the same name as the user and automatically add the user to this group.


    Section 3.4
    You can have make use all available processors by simply changing your make line like this
    Code:
    make -j $(nproc) && make install
    nproc always returns the number of processors.


    Section 3.5
    Instead of copying then deleting the config files, you can simply batch rename them by doing
    Code:
    rename .conf.dist .conf *.conf.dist
    777 is much too permissive as anyone with access to the system could trash the files. I suggest using 640 instead. There is no need to give executable permissions on the config files as they are executable. Another way to do this (a bit more desciptive, but longer to type) is to use
    Code:
    chmod u+rw-x,g+r-wx,o-rwx *.conf
    This sets up the 640 permissons, but is a bit easier to read if you know how.

    The same can be done for the executables themselves. Here I suggest using
    Code:
    chmod u+rwx,g+x-rw,o-rwx authserver worldserver
    This effectively gives permission 710 on both authserver and worldserver.

    For the data folder, I again suggest using different permission than 777. Try using 760.

    I also don't suggest changing the realmserver port from the default 3724. Though not really terrible, it does force players to add the port in their realmlist.wtf file.

  3. #3
    K A P P A L O U N G E

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    2,451
    Quote Originally Posted by MyLilSuccy View Post
    Here's some rather minor suggestions for the tutorial

    Section 2.5
    I suggest adding the -U option to the useradd command as this will create a group with the same name as the user and automatically add the user to this group.


    Section 3.4
    You can have make use all available processors by simply changing your make line like this
    Code:
    make -j $(nproc) && make install
    nproc always returns the number of processors.


    Section 3.5
    Instead of copying then deleting the config files, you can simply batch rename them by doing
    Code:
    rename .conf.dist .conf *.conf.dist
    777 is much too permissive as anyone with access to the system could trash the files. I suggest using 640 instead. There is no need to give executable permissions on the config files as they are executable. Another way to do this (a bit more desciptive, but longer to type) is to use
    Code:
    chmod u+rw-x,g+r-wx,o-rwx *.conf
    This sets up the 640 permissons, but is a bit easier to read if you know how.

    The same can be done for the executables themselves. Here I suggest using
    Code:
    chmod u+rwx,g+x-rw,o-rwx authserver worldserver
    This effectively gives permission 710 on both authserver and worldserver.

    For the data folder, I again suggest using different permission than 777. Try using 760.

    I also don't suggest changing the realmserver port from the default 3724. Though not really terrible, it does force players to add the port in their realmlist.wtf file.
    Thanks for your Suggestions, you have some nice things listed! I think people browsing through will try out your posts, im not going to change the main post since its functional as it is

    About the 3724 thing, people are forced to change their realmlist anyway so they can also add the Port when changing it, even with an realmlistchanger.

    Cheers and thanks.

  4. #4
    Now we are going to enter the data folder with cd data and download the dbcs,maps,vmaps and mmaps with the following command

    wget http://euve83284.serverprofi24.de/ac-web/resources.zip (1000MB+)
    Fix the link wget please

  5. #5
    K A P P A L O U N G E

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    2,451
    DBC, MAPS, VMAPS, MMAPS, CAMERAS, BUILDINGS Upgraded to Support newest TrinityCore. You can use them again!

    Tutorial Updated to TDB.61

  6. #6


    Join Date
    Apr 2008
    Location
    Security supervisor
    Posts
    974
    Hi mate. I just got into Linux and I'm trying to compile using your tut.

    I'm unable to proceed due to an unexpected error "Cmake 3.0 or better is required"

    I've been browsing around, but can't find Cmake 3.0 or better for Debian.

    Can you help? Thanks.

    Great guide so far by the way.

  7. #7
    Can be very useful for beginners! +rep

  8. #8
    Quote Originally Posted by Mallor View Post
    Hi mate. I just got into Linux and I'm trying to compile using your tut.

    I'm unable to proceed due to an unexpected error "Cmake 3.0 or better is required"

    I've been browsing around, but can't find Cmake 3.0 or better for Debian.

    Can you help? Thanks.

    Great guide so far by the way.
    Sounds like you are using Fedora, Red Hat or CentOS. If this is the case, you may have a version that has a older cmake. Try doing the following to download and build a newer version (from the TrinityCore wiki):
    Code:
    curl -o cmake-3.5.2.tar.gz https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
    tar -zxvf cmake-3.5.2.tar.gz
    cd cmake-3.5.2
    ./bootstrap
    make
    make install

  9. #9
    Quote Originally Posted by MyLilSuccy View Post
    Sounds like you are using Fedora, Red Hat or CentOS. If this is the case, you may have a version that has a older cmake. Try doing the following to download and build a newer version (from the TrinityCore wiki):
    Code:
    curl -o cmake-3.5.2.tar.gz https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
    tar -zxvf cmake-3.5.2.tar.gz
    cd cmake-3.5.2
    ./bootstrap
    make
    make install
    I have a error with that, tells me GCC:Trinitycore requires version 4.9.0 to build but found 4.7.2.
    Last edited by damata; 07-10-2016 at 10:22 PM.

  10. #10
    Quote Originally Posted by damata View Post
    I have a error with that, tells me GCC:Trinitycore requires version 4.9.0 to build but found 4.7.2.
    Google search for how to get GCC 4.9 (or later) for your Linux distro.

  11. #11
    Quote Originally Posted by MyLilSuccy View Post
    Google search for how to get GCC 4.9 (or later) for your Linux distro.
    I find nothing for my version, so I wanted to know if it helps me or what's recommend you.
    I have no experience with Linux, sorry. :C

  12. #12
    Well you would first need to tell me which Linux distro you are using. Without that piece of information, I can't give you any help whatsoever.

    Edit:
    Also need to know which version of the Linux distro.
    Last edited by MyLilSuccy; 07-11-2016 at 09:37 PM.

  13. #13
    Quote Originally Posted by MyLilSuccy View Post
    Well you would first need to tell me which Linux distro you are using. Without that piece of information, I can't give you any help whatsoever.

    Edit:
    Also need to know which version of the Linux distro.
    I hope that this will, I am told Jessie Debian is better but I don't know.


  14. #14
    K A P P A L O U N G E

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    2,451
    Rules:
    RED THINGS ARE FATAL/CRITICAL WHEN NOT CHANGED
    GREEN THINGS ARE TOTALY OPTIONAL BUT RECOMMENTED


    To install a newer GCC Version then your Current one, you need to install these packages first off
    apt-get install -y libgmp-dev libmpfr-dev libmpc-dev binutils subversion
    Navigate to any Folder... Checkout the correct 4.9 GCC Source to be Compiled from this Link
    svn co https://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch/ optionalfoldernameforthecheckout
    After the Checkout, create a new folder besides the fresh Checkedout Source and Compile the Stuff per visiting the src directory and then run this, remember to set the correct version/foldername at configuration
    ../gcc-VERSION/configure --prefix=/YOUR/OLD/GCC/BINARY/PATH/TO/UPDATE/ --enable-languages=c,c++ --enable-multiarch
    make
    make install
    the green ones in the quote above are optional (I used them too on my 4.6 -> 4.9 Upgrade)

    to find out your current gcc folder, type the following:
    which gcc
    Last edited by Psykko; 07-13-2016 at 11:57 AM.

  15. #15

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Thank U for help me but when used the code
    svn co...
    tells me invalid command. So... I'm so so confused.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •