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--
--Linux (server)--
- WinSCP
- SQLyog
- DBCs + Maps
- WoW (Testing)
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.
- 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
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:
If you get an error here, post and I might help.Code:apt-get install mysql-server
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:
And then cd into Mangos! Once again, simple.Code:git clone git://github.com/mangos/mangos.git mangos
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:
3. CompilingCode: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
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:4. Setting upCode: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;
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:All this does is give you +eXecute permission to the program.Code:chmod +x mangos-worldd; chmod +x mangos-realmd
Now, all you do is execute:
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?Code:./mangos-world
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:A message should pop-up, press Enter. You are now using Screen.Code: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:This should show something like:Code:screen -ls
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.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.
To reattach to a Screen, just execute:Although, it would be wise you actually enter your screen ID, not mine.Code:screen -r 19822
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