Jump to content
  • 0

Fresh linux install - serverzero


Markurian

Question

Hello everyone,

 

I am new to the community and I am having issues with following the Linux install guide on a fresh install of Ubuntu Server 16.04.

The instructions are not clear and the getmangos.sh script does not work out of the box.

I need instruction as to what folder structure I need when I git clone all the files, as the script keeps trying to use default locations that do not exist, or cannot be created, or what have you.

 

A proper, full step by step, command by command guide would be greatly appreciated.

 

Cheers

Link to comment
Share on other sites

23 answers to this question

Recommended Posts

3 hours ago, kernan said:

You are the man Markurian,

 

Thanks alot. Now my only problem is to login to the realm, keeps saying: "Logging in to game server".
I find Mang0s Server #1 but cant connect to the realm.

 

I did as you said in eariler post.

mysql -u root -p 
use realmd
update realmlist set address = '[192.168.1.44]' where id = 1;

 

Any ideas? :)

 

Edit: I was so tired.. I found what I did wrong. 


What I did:
update realmlist set address = '[192.168.1.44]' where id = 1;

What I did when I drank my coffee:
update realmlist set address = '192.168.1.44' where id = 1;

I assume that your issue has now since been resolved?

Link to comment
Share on other sites

We are in the process of preparing some new guides to go out with out new release, but they are not ready yet, in the meantime:
 

Is how to download the sourcecode correctly !!

There is then this wiki article for installing on Linux:

If you have a problem with the scripts, it would be useful to post some errors messages !

 

 

Link to comment
Share on other sites

Hello Markurian,

I've rewritten the getmangos.sh script recently and it went very smoothly on my computer. However, I have already deployed several dependancies. Maybe some of them are missing ?

It would help me to troubleshoot if you could give me your error message and paste it here.

In same time, please check this post: 

Can it be related ?

 

 

Link to comment
Share on other sites

I am spinning up a fresh Ubuntu Server 16.04.1 LTS instance to attempt this install again.

 

I will post back in detail any issues I encounter.

 

Logged in as root via sudo su -

cd ~

git clone https://github.com/mangoszero/server.git serverZero --recursive -b develop21
git clone https://github.com/mangoszero/database.git dbZero --recursive -b develop21

Git clone completed successfully

apt-get install mysql-server

Set root password as password

# Change dir to download location
cd ~/

# run getmangos.sh
~/serverZero/linux/getmangos.sh

# select "Install Prerequisites" and leave everything else default, select "OK"
# Would you like to install the required build and development packages?, select "YES"
# Install packages requires root access, which you will be prompted for. select "YES"
Screen jumps to the console, then jumps back into the purple vision, not echoing anything.
# user to run Mangos. enter "mangos"
# select "0 Original Release (Vanilla)
# Source-code Path. Enter the default /home/mangos/zero/src
# Would you like to create the directory "/home/mangos/zero/src". Select "YES"
# Installation Path. Enter the default "/home/mangos/zero"
# select "2 Use existing copy" (I assume because I already cloned it?)
# Build Options. Select "5 Build Client Tools". Select "Ok"
# Are you sure you want to build MaNGOS? Select "YES"

ERROR

root@mangos:~# ~/serverZero/linux/getmangos.sh
/usr/bin/lsb_release
bash: aptitude: command not found
bash: aptitude: command not found
The development tools and libraries have been installed!
Creating user: mangos
Creating source path: /home/mangos/zero/src
Using existing local repository
mkdir: cannot create directory ‘/home/mangos/zero/src/server/linux’: No such file or directory
Error: Failed to create the build directory!
root@mangos:~#

 

I am now attempting again, this time, with aptitude installed. A clean install of Ubuntu Server does not have it installed.

Result:

The development tools and libraries have been installed!
Using existing local repository
mkdir: cannot create directory ‘/home/mangos/zero/src/server/linux’: No such file or directory
Error: Failed to create the build directory!

The aptitude commands worked and installed all the prereqs, however, it still failed to create the build directory. I will manually build this directory and see what happens.

Result:

root@mangos:~# ~/serverZero/linux/getmangos.sh
Using existing local repository
CMake Error: The source directory "/home/mangos/zero/src/server" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** No targets specified and no makefile found.  Stop.
There was an error building MaNGOS!
root@mangos:~#

Didn't like the source directory. So I will this time clone the files as the mangos user, into the mangos home directory and sudo the getmangos.sh

root@mangos:~# cd /home/mangos/
root@mangos:/home/mangos# rm ./zero -rf
root@mangos:/home/mangos# su mangos
mangos@mangos:~$

git clone https://github.com/mangoszero/server.git serverZero --recursive -b develop21
git clone https://github.com/mangoszero/database.git dbZero --recursive -b develop21

cd ~/
sudo ~/serverZero/linux/getmangos.sh
Using existing local repository
mkdir: cannot create directory ‘/home/mangos/zero/src/server/linux’: No such file or directory
Error: Failed to create the build directory!

At this point, I don't know what it's asking for. I create these directories manually, yet it still complains about them not being there...

Link to comment
Share on other sites

Hello Markurian,

Many thanks for your reply, I may replace aptitude by apt-get then or any other standard RPM package installer available on Ubuntu. Sorry for you that you're the guinea pig, I don't have any Ubuntu available at this time to validate.

First of all, please use root to execute getmangos.sh, it's normally creating the mangos user for you if you decide so. The whole setup is executed with root and it is only at the end of the operation that the user you entered gets ownership of the installation.

I see that you are cloning the repo in the home directory (~) but you are entering the source-path as being /home/mangos/zero/src, therefore, it cannot find your sources. You need to provide to the installer the right location in which it can find your cloned "server" directory. For instance, if you cloned it in /home/myuser/server, enter /home/myuser.

Another note, the getmangos.sh script doesn't take other directories than "server" into account for sources for now. I see that you are using serverZero, therefore, it is not able to find your sources. I may update this in a future release.

Thank you again for your feedback, it will help the whole community to get a better implementation. :-)

Tal'/Warkdev

 

 

 

Link to comment
Share on other sites

Changes I would advise is to add aptitude to the repo list with a simple apt-get install aptitude, then use aptitude for the remainder. Would require less changes.

Another change is to have the getmangos.sh script to use serverZero as the default path as when you clone the repo, that is the dir it puts it in, that, or change your documentation to tell people to rename the directory after cloning.

Running tests now based off your advice. Will post results.

 

EDIT: Good news, it is now compiling. I renamed the cloned directory to server using

mv ~/serverZero ~/server

I then used /root/server as the src directory when asked "Source-code Path".

 

Mangos has now been installed and databases created.

 

I now need to work out how to get the pathfinding sorted.

Pathfinding is now being extracted. vmaps, mmaps, the lot.  Not sure what to do with the result though, as it said to cd to the install directory and run, which I did, but is that the bin dir? or another dir?

 

Edit: Alrighty! I have the server processes running. I extracted the game files and put them into the /home/mangos/server directory and found the server didn't like this, so you MUST put it into the BIN directory for that to work.

For some reason the database didn't get formed correctly, so I had to run the db creation script again and it worked this time around. Now.... How on earth do I setup a new user?

Edit: Googled it and found it on ownedcore. On the screen running mangosd, type the following:

account create [USERNAME] [PASSWORD]

This will create an account with the username and password you specified.

 

MY NEXT PROBLEM

I've changed my realmlist to the IP of the server, and it is not allowing me to connect to the realm. I can log into the server, but I get stuck on the realm selection screen and it does not allow me to connect to the realm...

THE SOLUTION:

on Linux, connect to the mysql server using the following:

mysql -u root -p [DATABASE]

database by default would be mangos0

once logged in, execute the following:

use realmd
update realmlist set address = '[YOUR SERVER'S IP]' where id = 1;

Use whatever your LAN IP (Local use only) or public facing (external use) IP is for the mangosd server. This will then allow you to connect to the realm.

Link to comment
Share on other sites

Hello Markurian, I'm happy to see that you succeed finally ! :-)

To comment step by step:

- I kept using apt-get instead of aptitude because I would like to not setup too much dependancies on unknown environment. I would like to use as much as out-of-the-box available tools.

- When you clone the repo using git clone --recursive https://<url>/<repo> -b <branch>, normally, you get it into server directory, if you have a serverZero, you may have followed some other guides that I missed and indeed, then there's incoherency. I would like to add some task to detect the server directory in the source detection instead of hard-coded 'server' value though.

- Regarding the post-install setup (IP for realm and so on), this is not provided out of the box, only default realm is available bound on 127.0.0.1, there's not yet any manager that can assist you into going further to set this up.

Regarding pathfinding, currently this is generated using grid I think (unsure though, maybe Antz has more info). If you have vmaps enabled, you are using navmesh I think, what kind of problem do you encounter ?

Link to comment
Share on other sites

On 2016-11-29 at 4:14 AM, Markurian said:

Edit: Alrighty! I have the server processes running. I extracted the game files and put them into the /home/mangos/server directory and found the server didn't like this, so you MUST put it into the BIN directory for that to work.

Hey man,

 

I got this problem when i run ./mangosd:

"Please check for the existence of map file './maps/0004331.map'
Correct *.map files not found in path './maps' or *.vmtree/*.vmtile files in './vmaps'. Please place *.map and vmap files in appropriate directories or correct the DataDir value in the mangosd.conf file."

 

 

Where is those files? I can't seem to find them, I would love to get some help! :)

Link to comment
Share on other sites

Did you extract the maps from the game files as per the following?:

# Copy your vanilla client files onto your server
(I suggest using winscp for this, or some other means of getting the files onto your server, the client files must be as they are installed onto a windows PC)

# CD to the compiled mangos directory, into the tools dir
cd /home/zero/bin/tools/

# copy all the tool files to the wow client files directory
cp ./*  /path/to/wow/client/files/

# CD to the client files directory where you copied the tools to.
cd  /path/to/wow/client/files/

# Set all .sh files in directory to be executable
chmod +x ./*.sh

# run the ./ExtractResources.sh script
./ExtractResources.sh

# When prompted with "Should all data (dbc, maps, vmaps and mmaps be extracted ?", press Y
# When prompted with "How many CPUs should be used for extracting mmaps? (1-4)", enter a number between 1-4, depending on how many threads you have.
# When prompted with "MMap extraction can be started delayed", press Enter
# when prompted with "Current Extraction Settings:" and you are ready to proceed, press Enter (NOTE: this will take a fairly long time and cannot be interrupted. Please be patient.

# Once complete, your wow client directory will have a few mor folders in it. Copy these folders to the /bin/ directory of your mangos installation.
cp ./maps /home/mangos/zero/bin
cp ./vmaps /home/mangos/zero/bin
cp ./mmaps /home/mangos/zero/bin
cp ./Buildings /home/mangos/zero/bin
cp ./dbc /home/mangos/zero/bin

 

Now try running up the server and see how you go.

Link to comment
Share on other sites

1 minute ago, kernan said:

Copy your vanilla client files onto your server

Where do I get the client files? :)

I just did the clone git server and database, do I need more files? 

 

Sorry for the questions...

You get the client files from where ever you see fit. I cannot tell you where, aside from if you have the game disks and the latest patch, you can install the client onto your PC, patch it up to 1.12.1 and then copy those files onto your server.

 

Mangos does not provide these files.

Link to comment
Share on other sites

 

9 minutes ago, Markurian said:

You get the client files from where ever you see fit. I cannot tell you where, aside from if you have the game disks and the latest patch, you can install the client onto your PC, patch it up to 1.12.1 and then copy those files onto your server.

 

Mangos does not provide these files.

Can I add you on Skype or something? I messed up now..

 

I accidently remove all the files in /zero/bin/tools

Link to comment
Share on other sites

34 minutes ago, kernan said:

 

Can I add you on Skype or something? I messed up now..

 

I accidently remove all the files in /zero/bin/tools

You can get the tools back from copying them from the git clone, they live under /clonedir/src/tools/Extractor_Binaries

 

That should work, otherwise you'll need to compile mangos again.

Link to comment
Share on other sites

13 minutes ago, Markurian said:

You can get the tools back from copying them from the git clone, they live under /clonedir/src/tools/Extractor_Binaries

 

That should work, otherwise you'll need to compile mangos again.

I found all files except "ExtractResources.sh". I will recompile and see how it goes.
Im very grateful for your help. Maybe I'll need some more help later, thanks! :)

 

Will update how it goes and what I do.

Link to comment
Share on other sites

38 minutes ago, Markurian said:

That should work, otherwise you'll need to compile mangos again.

I did recompile it now, but when I moved the bin/tools/* to my wow client on my Windows PC. I got error in CygWin that says "cannot execute binary file: Exec format error."
I've used Ubuntu Server as my server for mang0s. Do you have any tips?

Thank you Makurian.

Link to comment
Share on other sites

Just now, kernan said:

I did recompile it now, but when I moved the bin/tools/* to my wow client on my Windows PC. I got error in CygWin that says "cannot execute binary file: Exec format error."
I've used Ubuntu Server as my server for mang0s. Do you have any tips?

Thank you Makurian.

You need to copy the client files to your server, then run ExtractResources.sh on the server.

Link to comment
Share on other sites

2 hours ago, Markurian said:

You need to copy the client files to your server, then run ExtractResources.sh on the server.

You are the man Markurian,

 

Thanks alot. Now my only problem is to login to the realm, keeps saying: "Logging in to game server".
I find Mang0s Server #1 but cant connect to the realm.

 

I did as you said in eariler post.

mysql -u root -p 
use realmd
update realmlist set address = '[192.168.1.44]' where id = 1;

 

Any ideas? :)

 

Edit: I was so tired.. I found what I did wrong. 


What I did:
update realmlist set address = '[192.168.1.44]' where id = 1;

What I did when I drank my coffee:
update realmlist set address = '192.168.1.44' where id = 1;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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