Search the Community
Showing results for tags 'debian 9'.
I tested this on Debian 9.6 however this guide should work on any recent Debian distribution such as Ubuntu. Required Packages First we need to install all of the required programs and library's. Open up a root terminal. If your not root, enter this to become root sudo su Install the following packages apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev We need to grab the mysql stuff from here. Follow the instructions there. Also, choose mysql 5.7. A script needed later requires this so don't install mysql 8. Install the server with apt install mysql-server You also need to grab and compile libace. You can get it from here. Extract it and read the instructions.They're pretty straight-forward. It should be named 'ACE-INSTALL.html' or something similar. When thats done, enter this command. I highly recommend doing this even if your just keeping the server to yourself mysql_secure_installation I suggest these options: Don't use the password plugin Change the root password Remove the anonymous user Disable remote access for root Remove the test database Reload privileges Restart your system with init 6 Getting the Mangos source code Now we need the source code for mangos. Open up a terminal as root and go to the home directory: cd ~ Lets create a root directory for all of the mangos files mkdir mangos Now we clone the source code. Mangos servers above two are unstable or incomplete. Don't be surprised if something doesn't work or is missing. git clone https://github.com/mangoszero/server.git --recursive --depth 1 For the database git clone https://github.com/mangoszero/database.git --recursive --depth 1 If you want a different server(say mangos one), simply change the url. For example git clone https://github.com/mangosone/server.git --recursive --depth 1 For the mangos one server. If you want mangos two, simply do the same. Do the same with the database. Wait for the repos to be cloned (the server is about 200-250mb-ish) Compilaton The good part. Enter the mangos source directory cd server Make a new directory for the build files. mkdir build Go into it cd build Now run this to configure the makefiles cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos If cmake doesn't complain about anything, your good to go with compiling it. To speed up compilation, you need to know how many cores your cpu has. Most cpus have 2 or 4 cores. Search it up if your not sure. Now to compile it, simply enter this make -j2 Change -j2 to how cores you have. If you have 4 cores, change it to make -j4 If you only have one core, don't bother with the -j flag, just type in 'make' and hit enter. This will take a while depending on how fast your cpu is. Just be paitent. After a bit, mangos will be compiled(yay)and you will need to separate the needed files from the source code. To install it into your install prefix(default is /usr/local/bin/mangos), do this make install Database Setup: The Sequel Now for another database setup (i know, its crazy). This time, we will be loading some stuff into it. Enter the database folder you cloned earlier and execute InstallDatabases.sh ./InstallDatabases.sh If it says something similar to 'bash: ./InstallDatabases.sh: Permission denied', the script isn't marked as executable. Mark everything needed as executable by running this chmod -R +x *.sh Now have a go at running the script again. When execute it, you'll be brought to a menu. The defaults are fine for a new server so just press 'n' and hit enter You will have to give it your mysql details. This needs to be your server hostname(ip address), username, password and server port. The only things you need to change are the username and password. Keep in mind all of this must be done as the ROOT user. Game Data Now this is the longest part if decide to get mmaps. To run the server, you MUST extract the .dbc and .map files. To do this, copy everything in the tools folder to where your wow client is. Keep in mind the version of the client as it must be a specific version for this(mangoszero is a bit more lenient then others). You need 1.12.x (x can be any number) for mangoszero, 2.3.4 for mangosone, 3.3.5 for mangostwo(favourite), 4.3.4 for mangosthree and 5.4.1 for mangosfour. To extract the dbc and map files, execute this when in your wow client folder ./mapextractor This can take around 5 minutes to complete. Once thats done, copy over the folders "dbc" and "maps" to where you installed mangos. I recommend getting all of the data though so to get the vmaps, make sure the maps folder is still in your wow folder and exectute this ./vmaps4extractor Once thats done, type this in your terminal ./vmaps4assembler Just copy over the "vmaps" folder to where mangos is. Now for movemaps. This can take anywhere from an hour to a whole day depending on your computer and what client data you're extracting. Make sure the vmaps and maps folders are still in your wow folder and type this out ./MoveMapGen.sh 2 Now, you might want to know how many cores your computer has. Most computers have 2 so if you don't know, just leave the command as is. If you got 4 or 8 cores, replace the 2 with a 4 or a 8. More threads the better but your computer will be a lot slower if you use all of your cpu. Press enter and prepare to wait a while. Once its finished extracting, copy over the folder "mmaps" to where mangos is. You can delete the maps, dbc, vmaps, buildings and mmaps from your client folder now if you want. Server Configuration Now to configure the server. Go to the mangos configuration folder cd /usr/local/bin/mangos/etc Copy the files to their proper name. DON'T delete them. They're a backup in case your .conf files get corrupted or you mess up some settings cp mangosd.conf.dist mangosd.conf cp realmd.conf.dist realmd.conf Edit realmd.conf and find the line 'LoginDatabaseInfo', change the information to suit your database. For example if my database hostname is localhost or 127.0.0.1, the port is 3306, username is root, the password is mangos and my realm database is realmd, it would look like this LoginDatabaseInfo = "127.0.0.1;3306;root;mangos;realmd" Save the file and edit mangosd.conf. Look for lines, LoginDatabaseInfo, WorldDatabaseInfo and CharacterDatabaseInfo. Do the same to those lines as you did to the one in realmd.conf. You may wish to fully read mangosd.conf to fine-tune your server if you wish. Save the file. Starting the Server Now to see if your hard work has paid off. Go to where you installed the server and start realmd ./realmd Now start mangosd ./mangosd If theres a error mangosd or realmd can't fix, it'll tell you problem then exit. It will be up to fix it however. The most common problem is that the password or username is wrong or that the database isn't running. Try editing mangosd.conf or realmd.conf if thats the case and making sure the db is running If it started and gives you a prompt, the server is loaded and awaiting a connection from a client. Starting the server with systemd This allows you to startup your computer and have mangosd and realmd load with it. Very useful on a dedicated server. We need to make 2 .service files to do this. touch /etc/systemd/system/mangosd.service touch /etc/systemd/system/realmd.service Edit mangosd.service with your preferred text editor. Don't type 'edit /etc/systemd/system/mangosd.service' unless you know how to quit vi. [Unit] Description=WoW server After=network.target mysql.service [Service] Type=simple User=root ExecStart=/usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf Restart=on-abort [Install] WantedBy=multi-user.target Do the same with realmd.service [Unit] Description=WoW server After=network.target mysql.service [Service] Type=simple User=root ExecStart=/usr/local/bin/mangos/bin/realmd -c /usr/local/bin/mangos/etc/realmd.conf Restart=on-abort [Install] WantedBy=multi-user.target Let systemd reload. systemctl daemon-reload Start realmd via systemd to see if the .service file is valid systemctl start realmd Do the same with mangosd systemctl start mangosd Check the status of both services with systemctl status realmd systemctl status mangosd If it's working, you should see something like a green OK on both daemons (fun fact: daemons and services are the same thing) then you should be good to enable them at startup. Do this for realmd systemctl enable realmd systemctl enable mangosd Restart your system init 6 Check that they started as root systemctl status realmd Do the same with mangosd If its good then mangosd and realmd will always start with your system until you disable them. Letting WoW clients connect to your server This is the 2nd last thing you need to do. This will allow WoW clients to connect to your server. We need to edit a table in the database. If you know what your doing with mysql, follow along but do the equivalent on the terminal. If you prefer doing things with a gui(graphical user interface, your using one right now!), lets install a gui mysql client. We'll use 'mysql-workbench' apt install mysql-workbench After its installed, check your start menu in 'Programming'. Start mysql workbench and click on your server. Enter your password and look on the lower left. Click on the little arrow next to realmd and scroll down to realmlist. Right click on it and click on 'Alter Table'. Go down to localAddress and double click on the '127.0.0.1'. Change this to your lan ip. You can find out your lan ip by opening a terminal and typing in ifconfig You will see about 4-5 interfaces. If your connection is a wired one, you should look at a interface named 'enp' followed by letters and numbers. For example, 'enp14s0'. Then look at the 'inet' part. This is your lan ip. Do the same if your connection is wireless or wi-fi. Wireless connections will be named like 'wlp' with some letters and numbers. 'wlp20s0' is a example. Once you have changed localAddress to your lan ip, you need to change address to your external ip. Go here to find out your ip. Now we need to let realmd know that the database has changed. Stop it with systemctl stop realmd Now start it again with systemctl start realmd Connecting a WoW client to your server Nearly there! Go to where your wow client is and look for a file named realmlist.wtf. Delete everything in this file and put the following stuff in it set realmlist 10.1.1.1 set patchlist 10.1.1.1 Change 10.1.1.1 to your server ip. It can be the lan ip if its on the same network as the server. Now for the moment of truth. Open up WoW.exe(not the launcher)and wait for it to load. Skip the cinematic if want by pressing escape(esc). Now login into the server by using administrator as the email and no password. Choose the only realm and create your character. You now have a functioning WoW server for you and your friends to play on! Also, since you logged in using the admin account, you can use game master commands. Type in the chat '.gm help' for a list of commands currently in mangos. Have fun with it!