[Linux/Debian] Server setup + MaNGOS Compile menu

User Tag List

Results 1 to 12 of 12
  1. #1
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Linux/Debian] Server setup + MaNGOS Compile

    Alrighty, I have a bit of time and since I have my server up, I might aswell.
    Note: I have no clue on the situation with Maps, so I'm just going to do them to be on the safe side.

    Note: I will not be talking about Websites in this thread, this is just the core server.

    A little information before you start:
    The reason you are better off starting off running a core on Linux is because you will be able to have more players compared to running any core on a Windows machine, since Windows takes half the resources just for it's background services. Linux, maybe 15mb of RAM (CLI mode).


    Since I am running Windows on my PC and Debian on my Server, I will aiming towards my setup, but what you do is up to you.

    First things first, get the tools you need, which in this case are:
    --Windows--

    • WinSCP
    • SQLyog
    • DBCs + Maps
    • WoW (Testing)
    --Linux (server)--
    • Debian (Ubuntu, etc) or RedHat (CentOS,Fedora) [latest]
    • SSH + Root access
    • MySQL Server (optional, could be a remote host)
    • GCC 4.1.x
    • cmake
    • glibc & glibc-dev(glibc headers)
    • make
    • mysql-server 4.1 or mysql-server 5.0 && libmysql++-dev
    • libtool
    • OpenSSL
    • SVN & Patch
    • Git
    • zlib
    • screen
    Once you have all that (or most), start WinSCP and connect to your server as an admin . Once done, press CTRL+P and PuTTY should pop-up. Enter your password again and then type 'sudo -l root' without quotes, then enter root password and let's begin.
    Btw, to paste in PuTTY is Right-click on the mouse.


    1. Update your machine.

    --If you did the above sudo sucessfully, you are root--
    Updating your machine is not hard, at all. Assuming you have at least root access or can use the SUDO command, no problems.
    Debian (with root): apt-get update
    Debian (with sudo access): sudo apt-get update
    RedHat (with root): yum update
    Redhat (with sudo): sudo yum update


    Once that is done, you are have updated your machine. Grats.

    Note: I recommend you use Apt-get. Look below on how to get it.
    Note: If you get some strange Python/Perl error in CentOS while trying to update with yum, restart the server and get apt-get by typing "yum install apt" without quotes. Continue to use Apt instead of Yum.

    2. Preparing for the compile.
    Once you have finished updating, you want to install the utilities for GCC/G++ to support Mangos (list above, if you haven't already).
    What you want to run is:
    Code:
    apt-get -y install gcc g++ automake autoconf screen make libmysql++-dev libtool libssl-dev subversion patch zlibc libc6 git git-core pkg-config

    With or without sudo, you should know by now and how. I'm stopping doing sudo now. You still should do it if you have to.
    If you want to install MySQL server, just execute this:
    Code:
    apt-get install mysql-server
    If you get an error here, post and I might help.
    2.1 Preparing the Source
    Now that you have the tools to do what you need to, you need to find a directory to place this all. This is up to you. I put it in '/root/'.
    So once you found a directory, you want to actually get the source of your core. Depending if your core is using Git or SVN.


    --SVN--

    Once in your wishful directory, execute this command:
    [code]svn co svn://www.arcemu.info/svn/trunk/[code]
    And simply cd into into trunk! Simple as that.
    To update, simply go into truck and execute:
    Code:
    svn update


    --Git--

    In your required directory, execute:
    Code:
    git clone git://github.com/mangos/mangos.git mangos
    And then cd into Mangos! Once again, simple.
    To update, cd into mangos and execute:
    Code:
    git pull


    2.1.1 Patching MaNGOS with ScriptDev2

    Change Directory (cd) to your freshly downloaded/updated MaNGOS which in my case is "/opt/builds/mangos" and then execute this:
    Code:
    mkdir src/bindings/ScriptDev2; svn co https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2/ src/bindings/ScriptDev2; git apply src/bindings/ScriptDev2/patches/MaNGOS-****-ScriptDev2.patch
    3. Compiling

    Compiling couldn't be simpler, but time consuming.
    Instead of actually typing all the instructions in, you could just paste them straight to PuTTY and it will do the work for you.
    Ofcourse this will install Enable RA (remote console), the MaNGOS CLI and install it at "/opt/mangos". So change at will.


    Note: This could take a few hours depending on your server!

    Note: I don't actually support ArcEmu, so compiling it under these instructions could mess it up, but you could try.
    Note: Closing PuTTY, disconnecting in anyway, turning your PC off or closing WinSCP will stop the compile and you would have to start again.
    Code:
    
    
    Code:
    mkdir build;
    cd build;
    cmake ../ -DPREFIX=/opt/mangos -DPCH=1 -DACE_USE_EXTERNAL=0 -DDEBUG=0 -DTBB_USE_EXTERNAL=0;
    make -j [#ofCores +1 ie: 3 for a dual core];
    make install;
    
    4. Setting up
    Now that you finished Compiling, how ever long it took you, it's now time to get your server set up.

    Go back to WinSCP and above the second Window, press the folder with '/' on it, and then find in the second Window where you have installed MaNGOS to. Once you are inside your MaNGOS Dir, continue.


    4.1 Configuration
    Once that is complete, while still in WinSCP, go into the 'etc' directory of your MaNGOS directory (/path/to/server/etc) or wherever you set the configs to be. Then edit them as usual.
    Double-click them to copy them to your PC and open them to edit. CTRL+S to save and to upload back to the server.

    4.2 DBC
    Once done with the configs, press the Folder above the second Window to the left of the '/' folder.
    Then go to the first Window and and find your DBC folder. Then drag n' drop it into the second Window. It should start to upload it.
    Make sure the your DBCs are at "/path/to/server/DBC"

    Note: Make sure it is DBC and not 'Dbc' or 'dbc' as Linux is CaSe SeNsItIvE!

    4.3 Maps

    Note: This could take a few hours aswell. This depends on the Internet connection of your server and you.

    As with the DBC, find your way in the first Window to your Map folder, but don't go inside. Drag n' drop it into your MaNGOS folder and wait.

    That's it! Section 4 done!

    5 Starting the server

    Note: I am not covering the database part of the setup. Please use another Guide for this. But remember to connect to your server, not localhost.

    After all that effort (lol), you wish to start your server...
    Change directory to (cd) "/path/to/server/bin" without quotes. (cd /opt/mangos/bin)

    Now you want to give permission to yourself to run the program. Make sure you sudo!!!
    Execute:
    Code:
    chmod +x mangos-worldd; chmod +x mangos-realmd
    All this does is give you +eXecute permission to the program.

    Now, all you do is execute:
    Code:
    ./mangos-world
    Right. Now there are problems. As soon try, you notice that you can only have one program running at once and as you close PuTTY, the server stops. Stupid, amirite?

    5.1 Screen
    Luckily, there is a solution. Screen.
    Linux Screen Tutorial and How To | Resources | rackAID

    Screen is amazing. It lets you run anything in the background.
    More info, click the link above.

    5.1.1 Brief how to use
    Execute:
    Code:
    screen
    A message should pop-up, press Enter. You are now using Screen.
    To detach (close that session), press CTRL+A and then D .
    To fully close that Screen (kill the session), just type exit and press enter.

    To show a list of current screens, execute:
    Code:
    screen -ls
    This should show something like:
    Code:
    logon:/opt/builds/mangos# screen -ls
    There are screens on:
            19822.pts-0.logon       (01/12/10 02:26:24)     (Detached)
            6101.pts-0.logon        (12/27/09 05:35:27)     (Detached)
    2 Sockets in /var/run/screen/S-root.
    Very first part of "19822.pts-0.logon" is the Session ID (Screen number) and you use to reattach to. The rest is information about the screen.

    To reattach to a Screen, just execute:
    Code:
    screen -r 19822
    Although, it would be wise you actually enter your screen ID, not mine.

    5.2 Keeping up the server.

    This is simple, start Screen using the instructions above. Simply start the server like normally and then detach the Screen. Rinse and repeat with the Realm program.

    6. Problems
    Of course there are problems with this. Nothing is perfect!
    Although this guide has security problems and is skipping a bit. It's brief and with my 2 hours spare gone, I cba to do the rest.

    If you need anything, post.
    Otherwise, grats! You have a server on Linux! How do ya feel? ;D

    /bow
    Last edited by Sonic Waffle; 11-13-2011 at 09:52 AM. Reason: Updated for latest


    [Linux/Debian] Server setup + MaNGOS Compile
  2. #2
    kigiri's Avatar Member
    Reputation
    3
    Join Date
    May 2007
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey man, awesome tuto, but i'm new to linux and i'm stuck in this tutorial...

    It seem to be a stupid and simple error but i cant fix it by myself :

    First of all when i install (sorry my console is in french)

    Des erreurs ont été rencontrées pendant l'exécution*: (Some error have been found during the execution)
    acpid
    acpi-support
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Then when i try "git apply src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch " i got :

    admin@ks33425:~$ sudo git am src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch
    fatal: Not a git repository
    /usr/bin/git-sh-setup: line 145: cd: .git: Aucun fichier ou dossier de ce type //(no file or folder of that type ?)
    Unable to determine absolute path of git directory
    and if i try to compile with directly i got this directory error :
    admin@ks33425:~/objdir$ ../configure --prefix=/home/admin/mangos --sysconfdir=/home/admin/mangos/etc --enable-cli --enable-ra --datadir=/home/admin/mangos/dat
    bash: ../configure: Aucun fichier ou dossier de ce type //(=No file or folder of this type)
    admin@ks33425:~/objdir$ make
    make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt. //(=No target specified and no makefile found. stop.)
    admin@ks33425:~/objdir$ make install-j2
    make: *** Pas de règle pour fabriquer la cible « install-j2 ». Arrêt. //(=No rule for create target « install-j2 ». stop.)
    So any idea of what noobish mistake i didn't see ?
    PS : For ce path of the compilation i've tryd few different but nothing worked here is my mangos path :
    /home/admin/mangos

    Thx for any help Sorry for my english ;-)

  3. #3
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kigiri View Post
    Hey man, awesome tuto, but i'm new to linux and i'm stuck in this tutorial...

    It seem to be a stupid and simple error but i cant fix it by myself :

    First of all when i install (sorry my console is in french)


    Then when i try "git apply src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch " i got :


    and if i try to compile with directly i got this directory error :
    So any idea of what noobish mistake i didn't see ?
    PS : For ce path of the compilation i've tryd few different but nothing worked here is my mangos path :
    /home/admin/mangos

    Thx for any help Sorry for my english ;-)
    Ce n'est pas un problème

    Right, first thing. What Distro are you using and what version/release?

    As for the Git apply, make sure you are in /home/admin/mangos, and not in /home/admin (~/) otherwise it will return that error.
    You then execute while in /home/admin:
    Code:
    cd mangos; mkdir objdir; mkdir src/bindings/ScriptDev2; svn co https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2/ src/bindings/ScriptDev2; git apply src/bindings/ScriptDev2/patches/MaNGOS-****-ScriptDev2.patch
    (Seems I skipped that, but fixed it.)

    Yeah, you also make the objdir in the wrong place again. >.<
    You need to make it in '/home/admin/mangos', not '/home/admin'.
    Although, I have put it correctly in the little script above, so no worries.
    Just execute the above code in '/home/admin' like I said and it will all be done!

    Bonne chance! (Mes français est merdique! xD)


  4. #4
    kigiri's Avatar Member
    Reputation
    3
    Join Date
    May 2007
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx for the quick answer,
    Nice french btw
    I've put my terminal in english for more facilities to findout what was my issues.

    Now i know how to use "cd" command

    Helped me alot ^^

    But i still having a problem while trying to apply the scriptdev patch :/

    First i try this :
    Code:
    root@ks33425:/opt/mangos# git am src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch
    Return me this error :

    Code:
    Applying ScriptDev2 patch.
    error: configure.ac: does not match index
    error: src/bindings/.gitignore: does not match index
    error: src/bindings/Makefile.am: does not match index
    error: src/mangosd/Makefile.am: does not match index
    Patch failed at 0001.

    Then i try'd "git apply src/bindings/ScriptDev2/patches/MaNGOS-****-ScriptDev2.patch" from the same opt/mangos/ and got this :
    Code:
    error: patch failed: configure.ac:276
    error: configure.ac: patch does not apply
    error: patch failed: src/bindings/.gitignore:11
    error: src/bindings/.gitignore: patch does not apply
    error: patch failed: src/bindings/Makefile.am:14
    error: src/bindings/Makefile.am: patch does not apply
    error: patch failed: src/mangosd/Makefile.am:34
    error: src/mangosd/Makefile.am: patch does not apply
    I'm using Ubuntu 8.04.
    My core isn't in home/admin anymore i've try to set up this in the opt folder...

    Also, if you know wich patch does make the directory "bin" and "ect"?


    Anyway, Merci beacoup

  5. #5
    FireWolfz's Avatar Banned
    Reputation
    96
    Join Date
    Jan 2009
    Posts
    114
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice tut/guide , thanks alot +Rep

  6. #6
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kigiri View Post
    Thx for the quick answer,
    Nice french btw
    I've put my terminal in english for more facilities to findout what was my issues.

    Now i know how to use "cd" command

    Helped me alot ^^

    But i still having a problem while trying to apply the scriptdev patch :/

    First i try this :
    Code:
    root@ks33425:/opt/mangos# git am src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch
    Return me this error :

    Code:
    Applying ScriptDev2 patch.
    error: configure.ac: does not match index
    error: src/bindings/.gitignore: does not match index
    error: src/bindings/Makefile.am: does not match index
    error: src/mangosd/Makefile.am: does not match index
    Patch failed at 0001.
    Then i try'd "git apply src/bindings/ScriptDev2/patches/MaNGOS-****-ScriptDev2.patch" from the same opt/mangos/ and got this :
    Code:
    error: patch failed: configure.ac:276
    error: configure.ac: patch does not apply
    error: patch failed: src/bindings/.gitignore:11
    error: src/bindings/.gitignore: patch does not apply
    error: patch failed: src/bindings/Makefile.am:14
    error: src/bindings/Makefile.am: patch does not apply
    error: patch failed: src/mangosd/Makefile.am:34
    error: src/mangosd/Makefile.am: patch does not apply
    I'm using Ubuntu 8.04.
    My core isn't in home/admin anymore i've try to set up this in the opt folder...

    Also, if you know wich patch does make the directory "bin" and "ect"?


    Anyway, Merci beacoup
    For that, just delete the directory where your MaNGOS source is and just do the Git clone command again. Sometimes that happens, not too sure why.


  7. #7
    kigiri's Avatar Member
    Reputation
    3
    Join Date
    May 2007
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok thx i'll sure try this but for the moment i've give up on linux and compile my server on windows :/

    Anyay great tut, i might use it again

  8. #8
    7uck3r's Avatar Private
    Reputation
    1
    Join Date
    Dec 2009
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that tutorial is very good thanks alot for it!!!
    but i have a litle prob. i don't know wehre to get the DBC maps and vmap stuff.... i know that i need a programm to unpack it out of my wow... but i don't have it
    and wehre can i get a german database for my server with all world mobs spawning and the ini mobs as well an all the lot of quests from wow.... (yeah i know i have to fix some of them but it will be good if you have a database wich would not so bugy )

  9. #9
    mEtzG3r's Avatar Member
    Reputation
    30
    Join Date
    Nov 2007
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice guide, keep up the good work.We need more Linux guide, Linux is the only way to create a really good server.

    You killed my mom ! NOW I KILL YOU !!!


  10. #10
    autotron's Avatar Private
    Reputation
    1
    Join Date
    Nov 2011
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great tut thank you, I have a small issue though and can not find the answer...when I get to the complile portion, I had to modify to allow for cmake, but get an error
    CMake Error at CMakeLists.txt:153 (unset):
    Unknown CMake command "unset".

    can any one help me with this?

  11. #11
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by autotron View Post
    Great tut thank you, I have a small issue though and can not find the answer...when I get to the complile portion, I had to modify to allow for cmake, but get an error
    CMake Error at CMakeLists.txt:153 (unset):
    Unknown CMake command "unset".

    can any one help me with this?
    This guide is quite out of date, but there is only a few differences now. When compiling, use these commands to compile instead:
    http://getmangos.com/wiki/Compile_MaNGOS_On_Linux#Compile_the_sources


  12. #12
    n2kmaster's Avatar Member
    Reputation
    1
    Join Date
    Oct 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pi perhaps?

    Originally Posted by Sonic Waffle View Post
    This guide is quite out of date, but there is only a few differences now. When compiling, use these commands to compile instead:
    http://getmangos.com/wiki/Compile_MaNGOS_On_Linux#Compile_the_sources
    Anyone know if a Raspberry Pi run all this?

Similar Threads

  1. [GUIDE] MaNGOS 2.4.3 Super Simple Server Setup Wizard (noobpack+)
    By 711 in forum WoW EMU Guides & Tutorials
    Replies: 175
    Last Post: 09-17-2016, 12:01 PM
  2. Guide for .1.12.1 Classic WoW on Linux/Debian (external server)?
    By Lucaslycan in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 06-07-2012, 07:32 AM
  3. [GUIDE] MaNGOS 3.1.3 Super Simple Server Setup Wizard (noobpack+)
    By 711 in forum WoW EMU Guides & Tutorials
    Replies: 161
    Last Post: 12-27-2009, 02:33 PM
  4. [GUIDE] MaNGOS 3.0.3 Super Simple Server Setup Wizard (noobpack+)
    By 711 in forum WoW EMU Guides & Tutorials
    Replies: 36
    Last Post: 07-22-2009, 01:35 PM
  5. [Guide] Linux Server Setup
    By Rouslan in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-14-2008, 05:40 AM
All times are GMT -5. The time now is 08:37 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search