-
Couldn't load subscription status.
- Fork 155
Compiling OTServ 0.7.0 under Linux systems
Needed packages:
- git
- cmake
- gcc
- boost library
- lua 5.1 library
- gmp library
- libxml2 library
- luajit library (optional)
- mysql library (optional)
- sqlite library (optional)
For instance, if you have Ubuntu or a Debian based distribution you can install all the required packages with these commands using apt-get:
sudo apt-get install build-essential cmake git-core
sudo apt-get install libboost-all-dev libgmp3-dev liblua5.1-dev libxml2-devIf you are going to use the default cmake options (it requires mysql, and sqlite), you'll also need the following:
sudo apt-get install libmysqlclient-dev mysql-server libsqlite3-devIf you are using PostgreSQL, then you need:
sudo apt-get install libpq-dev libsqlite3-devgit clone git://github.com/opentibia/server.git
cd serverFirst create a build directory
mkdir build
cd buildTo use the default cmake options, just run:
cmake ..Otherwise you can supply some available options like USE_LUAJIT, USE_MYSQL, USE_SQLITE, USE_CPP11, USE_PCH. Example:
cmake -DUSE_LUAJIT=On -DUSE_MYSQL=On -DCMAKE_BUILD_TYPE=Performance ..If you do not have the libraries installed in the default locations, use -DCMAKE_INCLUDE_PATH= and -DCMAKE_LIBRARY_PATH to specify the search paths.
You can use cmake-gui to configure before bulding, you will be able to change and check build options in the interface.
cmake-gui ..Get out of the build folder, which should put you in the server folder and begin the compilation with make.
cd ..
make -j2TIP: If you have multiple cores, use -j4 option to build using 4 cores.
To run the server, just execute the otserv file.
cd ..
./build/otserv