Jump to content

disintegore

Members
  • Posts

    11
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by disintegore

  1. This guide is for Debian-based distributions. It can be used as a reference for other distros but you need to go the extra mile yourself. The only difference should be how you get the required packages. Intro: This guide is for those who would prefer to use the superior stability and resource management of Linux, or simply cannot use Windows for various reasons. While the current Linux sticky guide is a great source of information, there are a few nuances it fails to mentions and the aim of this thread is to address those. This guide will be largely similar, but will hopefully be more up to date with a few of the changes in the repositories. This guide is written with the complete beginner in mind, and as such might state the obvious on occasion. 1. Fetching the dependencies. Mangos needs a number of applications to be able to compile and run properly. Getting those is easy with a simple application of the aptitude package manager. sudo apt-get install build-essential gcc g++ automake git-core autoconf make patch libmysql++-dev mysql-server libtool libssl-dev grep binutils zlibc libc6 libbz2-dev cmake mysql-server will run a short and simple installation daemon of its own and ask for a root password among other things. Make sure to remember it. If you are unable to download some of these packages, try sudo apt-get update to bring aptitude's repositories up to date. If it still fails after that, it is possible that one of these packages is missing for a variety of reasons. You can try apt-cache search package (note that apt-cache does not require super user privileges) and look for those packages by name. 2. The mangos user (Optional) You might want to create a new user with which to run your mangos server. It is not advised to run the server (and a lot of other things) as root. adduser mangos And follow the prompts. A quicker, less verbose way to do this is useradd mangos passwd mangos This will create a new user with the name mangos and with owner privileges on /home/mangos by default. This is where I run my server, because the account is not used for anything else. If you would prefer your private server to run in another folder, make sure to give your mangos user owner privileges to that folder. chown /your/folder/here mangos And when you're done setting that up, switch to the user su mangos 3. Getting the Mangos source There's a lot of mangos versions to choose from. You can find them here: http://getmangos.eu/bb/topic/206/mangos-sourceproject-list/ This guide will use the master mangos project (Cataclysm) and if you're looking to host another xpac, simply change the github links to reflect that. Make sure you're in the right folder and then fetch the server, database and ScriptDev2 sources. ScriptDev2 needs to be in server/src/bindings git clone git://github.com/mangos/server.git git clone git://github.com/mangos/database.git cd server/src/bindings git clone git://github.com/mangos/scripts.git 4. Compiling the server source Patch ScriptDev2 into your server git apply src/bindings/scripts/patches/MaNGOS-*-ScriptDev2.patch And if this fails, edit the server/src/bindings/CMakeLists.txt manually and find this line #add_subdirectory(universal) Un-comment it, and change "universal" to "scripts" so that it looks like this: add_subdirectory(scripts) and save the file. CMake will then know to include ScriptDev2. Then go back to your server folder, create a new directory in which to build the project, and navigate to that. Note that ~/ is a relative path to the current user's home directory. cd ~/server mkdir build cd build Build the server, specifying where it will be installed to after compiling. This can take about 5 minutes. Note that ".." is a constant for the parent directory. Doing "cmake .." in /home/mangos/server/build is the same as doing "cmake /home/mangos/server". The -DPREFIX= argument specifies where the server will be installed. Change it accordingly. cmake .. -DPREFIX=/home/mangos/ make make install 5. Extracting the game assets In your server's root directory (in this case, /home/mangos/), create a folder for your data files. It can be named whatever you want, but you'll need to remember that folder name for later. I use "data". Make your logs folder while you're at it too. mkdir data mkdir logs And then extract the data files from Blizzard's mpq archives. Make sure you the client's version matches your server's. On Linux (I have not done this process under linux myself. Correct me if I got it wrong.) If your appropriate WoW client folder is on your Linux system, copy the items in server/contrib/extractor_binary to your WoW client, give permissions for the bash scripts to run and execute them. Once that's done, cp server/contrib/extractor_binary/* /your/wow/client/location/ cd /your/wow/client/location chmod +x *.sh ./ExtractResources.sh mv dbc /home/mangos/data/dbc mv maps /home/mangos/data/maps mv vmaps /home/mangos/data/vmaps On Windows Move the files in server/contrib/extractor_binary to your WoW client's location on your Windows filesystem. Click start, type cmd in the search bar and do shift+ctrl+enter to run it as administrator. Navigate to your WoW client's location and do the following. ad.exe vmapExtractor.exe vmap_assembler.exe buildings vmaps Move the dbc, maps and vmaps folders to your server's data folder on your linux filesystem. 6. SQL batch magic Mangos uses SQL databases to store just about a million things. It also comes with a number of batch scripts to build the required databases for you. You will be using the "mysql -u root -p" command a lot. This command essentially lets you run mysql queries from the command line. The -u parameter specifies which user to apply the query as (in this case, root), and the -p parameter is necessary if your user has a password. Keep in mind -p by itself works and you don't need to do "mysql -u root -p qwerty123" or whatever your password is! Note that these .sql files would probably work with a gui mysql application such as phpmyadmin or navicat. Start with the files in server/sql. This will create the three databases Mangos uses and build the table structures. cd /home/mangos/server/sql mysql -u root -p < create_mysql.sql mysql -u root -p realmd < realmd.sql mysql -u root -p characters < characters.sql mysql -u root -p mangos < mangos.sql ScriptDev2 also needs its own database. cd /home/mangos/server/src/bindings/scripts/sql mysql -u root -p < scriptdev2_create_database.sql mysql -u root -p scriptdev2 < scriptdev2_create_structure_mysql.sql mysql -u root -p scriptdev2 < scriptdev2_script_full.sql Now you need to populate the databases. This includes quests, dialog, etc. There is a script that will compile a massive number of sql files into one big sql batch you can apply at once. cd /home/mangos/database chmod +x make_full_db.sh ./make_full_db.sh mysql -u root -p mangos < full_db.sql Depending on when you are reading this, the server might need a few "updates" applied to it without which the world server will refuse to run. I needed to do this with mangoszero but not mangostwo. Do this step if you get an error at runtime. cd /home/mangos/server/sql/updates mysql -u root -p mangos < blahblahblah_mangos_whatever.sql Repeat for every similar .sql file in the folder. Mangos might not be the appropriate database for this every time. 7. Configuration To configure your server you will need to edit a few text files, and edit a few entries in your SQL databases. I recommend you use a graphical SQL client such as phpmyadmin if your computer runs apache2, navicat for windows or squirrel sql for linux. First, copy the default configuration files created by your server and edit them as necessary. cd /home/mangos/etc cp realmd.conf.dist realmd.conf cp mangosd.conf.dist mangosd.conf cp scriptdev2.conf.dist scriptdev2.conf The minimal effort required run a function server is to edit the following lines in mangosd.conf DataDir = "/home/mangos/data" LogsDir = "/home/mangos/logs" Of course you should go over all three .conf files and change what you want. Comments can tell you much more than I can. Now, point your SQL client to your SQL server and select the realmd database. Then select the realmlist table. There should already be an entry there. Edit the name, address and port fields as necessary. The reason why 127.0.0.1 doesn't work is because that address is what the CLIENT will try to connect to, and thus will try to probe itself. 8. Running the server and creating an Admin account Your binaries will be located in the bin folder of your server's root directory. Those are mangosd realmd. mangosd is the world server and realmd is the realm server. Typically you only need one instance of realmd running, and one mangosd instance for every realm you want in your realmlist. If you want to run these servers using screen, use these scripts, courtesy of krampf. Make sure to chmod +x them. #!/bin/sh cd /home/mangos/bin screen -A -m -d -S mangosworld ./mangosd #!/bin/sh cd /home/mangos/bin screen -A -m -d -S mangosrealm ./realmd Make sure to run ./mangosd normally once, because you'll need to create your account and give it admin privileges. Run these commands in the mangos command shell. account create "username" "password" account set gmlevel "username" 3 And here you go! A functional, partially scripted private server for you to mess around with. Have fun.
  2. Problem solved. Will post about how tommorow. I downloaded and compiled the server and then ran all the required SQL scripts. When I try to run the world server I get this error: SQL: SELECT required_z2241_s1878_12344_01_mangos_command FROM db_version LIMIT 1 query ERROR: Unknown column 'required_z2241_s1878_12344_01_mangos_command' in 'field list' The table `db_version` in your [WORLD] database indicates that this database is out of date! [A] You have: --> `z2193_s1826_12279_01_mangos_creature_template.sql` [b] You need: --> `z2241_s1878_12344_01_mangos_command.sql` You must apply all updates after [A] to [b] to use mangos with this database. These updates are included in the sql/updates folder. Please read the included [README] in sql/updates for instructions on updating. Now I haven't uploaded the client data yet (I want to make sure I get it right first) and this might be the issue, but judging by the completely different filenames being compared here I think the issue might be with a script. Realmd works fine. Sorry if this has already been answered. Edit: Also the scriptdev2.conf.dist file is missing from the etc folder. According to scriptdev2's CMakeList.txt file, it should be there. install(FILES scriptdev2.conf.dist.in DESTINATION ${CONF_DIR} RENAME scriptdev2.conf.dist) Upon further examination absolutely nothing from ScriptDev2 has been added. I've tried with both src/bindings/scripts and src/bindings/ScriptDev2 as the folder names. I think ScriptDev2 not being "patched" into mangos was the issue, but when I try to run the git apply command, I get an error that reads "patch does not apply." Edit2: I managed to get the ScriptDev2 patch to work. Rebuilt the server and still scriptdev2.conf.dist is missing. Edit3: Turns out applying the .sql patches in server/sql/updates did the trick. I should have done more research. Now mangosd asks for data files which I'm in the middle of uploading. I'm still irked about the ScriptDev2 stuff being absent though. Edit4: The git patch in src/bindings/scripts/patches seems to be broken. Turns out editing src/bindings/CMakeLists.txt manually works. I feel stupid for not figuring this out earlier. Now I'm recompiling and it includes scriptdev2 just fine. Will update again if I run into more trouble.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use