Jump to content

[Wiki] How to Compile on Linux (Ubuntu)


Guest krampf_

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Hello

I installed mangos but when I log in I can't log out, npc's functions are not available, and I cannot fight.

does anyone has an idea where the problem is?

Have you patched wow.exe file ?

EDIT : Someone of this site don't see this step fine :

Patching SD2 into MaNGOS
git apply src/bindings/ScriptDev2/patches/MaNGOS-*-ScriptDev2.patch

Why?

Link to comment
Share on other sites

this patch -> git apply src/bindings/ScriptDev2/patches/MaNGOS-*-ScriptDev2.patch I've applied direct on my server

should I apply another direct to wow.exe? how can I do that?

I think the main problem is that I can't do any actions. maybe it's in the scriptdev database but i haven't any idea where

which patches must be applied to the databases? is somewhere a database to download who i can download an use as it is?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
hmm... I am pretty new to ubuntu(linux) ... how can I share a windows? by vm?

Don't know if you found out yet Alex, but it looks like you're still looking based off this thread. :)

On VirtualBox make sure that you install guest additions and then Share a Folder through the VirtualBox Settings.

Now the way I do it is I share my entire C Drive so under my share name it's C_DRIVE (Yes. The name will be something you need. :) )

After I start the VM for the first time simply go to the terminal and a couple steps. First off. You need a folder to be your shared folder. I personally just

sudo mkdir Shared

Afterwards you have your shared folder, for arguments sake it's going to be named SharedFolder

sudo mount -t vboxsf SharedFolder Shared

Mount Virtual Box SharedFolder into Folder named Shared it's essentially what you're telling Linux to do; it finds that Shared Folder and now when you

cd /Shared

You should now be inside of your shared folder.

Hope that helps ya out some.

(If using Ubuntu Server Edition I recommend installing it as a service and setting it to autostart and to save state on system shutdown) Just send me a PM if you need help to do that also; oh yeah; if you do that don't forget to install ssh onto the box and to also have a system IE Putty to ssh into your server afterwards and also log the Internal IP.

Link to comment
Share on other sites

Hey guys,

I have another question about this:

This is about Version 4.3.4, but what I need/want is 2.4.3 --> Solution: Mangos-One (Correct me if i'm wrong).

I tried to compile it the same way as discribed here for 4.3.4, changing the git paths to the Mangos-One-repositories and it worked fine until I reached the point "compiling". I created the named directory, typed

sudo chown -c MyUserName /opt/mangos-server

created the directory objdir (just in /mangos/server/ ???), entered it and typed

cmake .. -DPREFIX=/opt/mangos-server

which failed. I got:

-- Detected 32-bit platform.

This script builds the MaNGOS server.
 Options that can be used in order to configure the process:
   PREFIX: Path where the server should be installed to
   PCH: Use precompiled headers
   DEBUG: Debug mode
 To set an option simply type -D<OPTION>=<VALUE> after 'cmake <srcs>'.
 For example: cmake .. -DDEBUG=1 -DPREFIX=/opt/mangos

-- Using mysql-config: /usr/bin/mysql_config
-- Found MySQL library: /usr/lib/i386-linux-gnu/libmysqlclient_r.so
-- Found MySQL headers: /usr/include/mysql

MaNGOS-Core revision  : 4b6584665c2fb3214e4811d1fa6f00d60fef5994

Install server to     : /opt/mangos-server

Use PCH               : No
Build in debug-mode   : No  (default)

CMake Error at src/bindings/CMakeLists.txt:21 (add_subdirectory):
 add_subdirectory given source "scripts" which is not an existing directory.


-- Configuring incomplete, errors occurred!

Can anyone help me? Did I just do any mistake or do I have to compile the Mangos-One in another way? If yes: in what way?

Thanks a lot!

extra

Link to comment
Share on other sites

CMake is looking for src/bindings/scripts and it doesn't exist. Go to src/bindings and there you should have most likely universal assuming you didn't patch it with ScriptDev0/2 so on and so forth, so.

sudo nano CMakeLists.txt

At the end of it you will have

add_subdirectory(scripts)

That will need to be changed to whatever you have in bindings wether it be scriptdev2 ScriptDev2 or universal etc etc. (Yes. Capitilazation matters.)

EG.

The folder inside src/bindings is universal

The end of your CMakeLists.txt will be

add_subdirectory(universal)

Now run Cmake like you tried before and you should be good to go.

Link to comment
Share on other sites

  • 3 weeks later...

I did the howto as descript. Perfect, thx. But one thing: the mangos doesn't like the database.

Starting mangos normal whitout screen gif me:

SQL: SELECT required_12300_01_mangos_mangos_string FROM db_version LIMIT 1

query ERROR: Unknown column 'required_12300_01_mangos_mangos_string' in 'field list'

[1 ms] SQL: SELECT * FROM db_version LIMIT 1

The table `db_version` in your [WORLD] database indicates that this database is out of date!

A You have: --> `12195_02_mangos_mangos_string.sql`

B You need: --> `12300_01_mangos_mangos_string.sql`

You must apply all updates after A to B to use mangos with this database.

How do I solve this?

Thx, Pit

Link to comment
Share on other sites

I did the howto as descript. Perfect, thx. But one thing: the mangos doesn't like the database.

Starting mangos normal whitout screen gif me:

SQL: SELECT required_12300_01_mangos_mangos_string FROM db_version LIMIT 1

query ERROR: Unknown column 'required_12300_01_mangos_mangos_string' in 'field list'

[1 ms] SQL: SELECT * FROM db_version LIMIT 1

The table `db_version` in your [WORLD] database indicates that this database is out of date!

A You have: --> `12195_02_mangos_mangos_string.sql`

B You need: --> `12300_01_mangos_mangos_string.sql`

You must apply all updates after A to B to use mangos with this database.

How do I solve this?

Thx, Pit

go /path/to/mangos/server/sql (https://github.com/mangos/server/tree/master/sql/updates)

and apply the updates to your world database.. :)

Link to comment
Share on other sites

  • 1 month later...

Wrote my own little install script with the information here and some other sites I found to install mangos one. edit the git address and svn address for the other version of mangos.

open up your favorite text editor, (gedit, vim, nano) paste that. Save it as a <file>.sh chmod +x <file>.sh then ./<file>.sh and away it goes.

#!/bin/bash

#install script for mangos one server

clear

echo "Installer script for Mangos-One"

echo "Lets get some input"

echo "Install needed packages y/n"

read line

echo "Enter directory for mangos i.e mangos-one"

read folder

echo "Enter server directory starting with a i.e /home/user/mangos-one-server"

read sfolder

echo "enter mysql root password"

read rpass

if [ "$line" = "y" ]

then

sudo apt-get install lamp-server^ build-essential automake autoconf libmysqlclient-dev libtool libssl-dev zlib1g-dev pkg-config git-core ssh cmake subversion

fi

echo "Is $folder correct y/n?"

read line

if [ "$line" = "y" ]

then

mkdir $folder && cd $folder

else

echo "Enter soure directory i.e /home/mangos-one"

read folder

mkdir $folder && cd $folder

fi

echo "Mangos Source"

git clone git://github.com/mangosone/server.git

cd ~/$folder/server

echo "ScriptDev2"

git clone git://github.com/mangosone/scripts.git src/bindings/ScriptDev2

echo "Patch ScriptDev2"

git apply src/bindings/ScriptDev2/patches/MaNGOS-One-s1368-ScriptDev2.patch

echo "About to build the server this will take a while, continue y/n"

read c

mkdir $sfolder

if [ "$c" = "y" ]

then

mkdir build

cd build

cmake ../ -DPREFIX=$sfolder

make

make install

cd ..

fi

cd ~/$folder

mkdir acid && cd acid

echo "Acid database"

svn co https://sd2-acid.svn.sourceforge.net/svnroot/sd2-acid/trunk/tbc/

cd ..

echo "Getting the Database"

git clone git://github.com/mangosone/database.git

cd ~/$folder/server/sql

echo "Installing the Database"

#Creating the databases and base structure

mysql -u root -p$rpass < create_mysql.sql

mysql -u root -p$rpass characters < characters.sql

mysql -u root -p$rpass mangos < mangos.sql

mysql -u root -p$rpass realmd < realmd.sql

#ScriptDev2 Database

echo "Installing ScriptDev2 Database"

cd ~/$folder/server/src/bindings/ScriptDev2/sql

mysql -u root -p$rpass < scriptdev2_create_database.sql

mysql -u root -p$rpass scriptdev2 < scriptdev2_create_structure_mysql.sql

mysql -u root -p$rpass scriptdev2 < scriptdev2_script_full.sql

#MaNGOS Database

echo "Installing MaNGOS Database"

cd ~/$folder/database/_tools

chmod +x make_full_db.sh

./make_full_db.sh

mysql -u root -p$rpass mangos < full_db.sql

#Acid

echo "Installing Acid 2.0.7"

cd ~/$folder/acid/tbc/2.0.7

mysql -u root -p$rpass mangos < 2.0.7_acid.sql

cd ~$sfolder

cp mangosd.conf.dist mangosd.conf

cp scritdev2.conf.dist scriptdev2.conf

cp realmd.conf.dist realmd.conf

echo "Install should be complete"

echo "Edit your realmd and mangosd config files and you should be good to go."

exit

Sorry for the wall of text.

Link to comment
Share on other sites

  • 2 weeks later...

Hey, following this guide to build mangos three 4.3.4

get to this stage >

MaNGOS Database

cd ~/mangos/database

./make_full_db.sh

mysql -u root -p mangos < full_db.sql

and ./make_full_db.sh doesnt exist.

any suggestions? oh and hey :)

Link to comment
Share on other sites

Looking at the github for the cata database, to get to the make_full.db.sh it would be under then "database / MaNGOS3_Cata_Rev_2 ". So the cd path would need to be updated to match that. Under "database / MaNGOS3_Cata_Rev_3" there is a .7z file that might have the full database already created that you would use mysql -u root -p mangos < full_db.sql command for.

Link to comment
Share on other sites

Looking at the github for the cata database, to get to the make_full.db.sh it would be under then "database / MaNGOS3_Cata_Rev_2 ". So the cd path would need to be updated to match that. Under "database / MaNGOS3_Cata_Rev_3" there is a .7z file that might have the full database already created that you would use mysql -u root -p mangos < full_db.sql command for.

ok extracted the sql file from the Rev_3, and renamed it, and run the command. seemed to work, thx :)

Link to comment
Share on other sites

  • 3 months later...

Thanks for the guide.

Anyone got mangos 3 running on ubuntu ??? 12.04

if so is there an updated guide that maybe goes in depth a little more for each step?

I don't want to just blindly run a server i wanna know what is going on and why i'm doing each step.

It seems i get so far then errors or things just don't want to go the way they should.

I did have this running on a windows PC about the time of BC so it's been a while and i'm really just interested in raiding with friends on a weekend for shits and giggles. none of this leveling or farming etc etc

hope someone can help with the more indepth guide or shed some light on this one

Link to comment
Share on other sites

  • 6 months later...

Compiling (with an install dir of /opt/mangos-server) Note: If /opt/mangos-server does not exist, create it and chown to the user you compile your code with

Code: [select]

mkdir objdir

cd objdir

cmake .. -DPREFIX=/opt/mangos-server

make

make install

had the flowing error after this bit of code {cmake .. -DPREFIX=/opt/mangos-server}

cmake error at cmakelists.txt:64 (message)

this project requires an out of source build. Remove the file 'CMakeCache.txt found in this directory be for continuing, create a separate build directory and run \

cmake [options] <srcs>' from there

configuring incomplete,error occurred!

im useing mangostwo and unbuntu 12.04 server core.

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • 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