You cannot see this page without javascript.

WOW server

Linux 조회 수 1847 추천 수 0 2015.01.11 23:41:14

1. ACE Install

[root@host plugin] yum groupinstall "development tools"
[root@host plugin] yum groupinstall "development libraries"
[root@host plugin] yum install gcc-g++ mercurial wget links zip unzip unrar openssl cmake boost boost-devel

[root@host plugin] cd /apm/server
[root@host server] wget http://download.dre.vanderbilt.edu/previous_versions/ACE-6.3.3.tar.gz
[root@host server] tar xvfz ACE-6.3.3.tar.gz
[root@host server] vi ~/.bash_profile

ACE_ROOT=/apm/server/ACE_wrappers;
export ACE_ROOT
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/ace:$ACE_ROOT/lib:/usr/local/lib:/usr/lib;
export LD_LIBRARY_PATH
PATH=$PATH:.:$JAVA_HOME/bin:$HOME/bin;
export PATH

[root@host server] source ~/.bash_profile
[root@host server] cd ACE_wrappers/ace
[root@host ace] ln -s config-linux.h config.h
[root@host ace] cd $ACE_ROOT/include/makeinclude
[root@host makeinclude] ln -s platform_linux.GNU platform_macros.GNU
[root@host makeinclude] cd $ACE_ROOT
[root@host ACE_wrappers] make
[root@host ACE_wrappers] cd ./examples/Threads
[root@host Threads] make
[root@host Threads] ./task_one

(140169006995200) in iteration 1
(140169006995200) in iteration 2
(140169006995200) in iteration 3
(140169006995200) in iteration 4
(140169006995200) in iteration 5

[root@host Threads] cd /apm/server
[root@host server] mkdir trinitycore
[root@host server] cd trinitycore
[root@host trinitycore] git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git trinitycore-335
[root@host trinitycore] git clone -b 6.x git://github.com/TrinityCore/TrinityCore.git trinitycore-6x
[root@host trinitycore] mkdir build-335
[root@host trinitycore] cd build-335
[root@host build-335] cmake ../trinitycore-335/ \
-DCMAKE_INSTALL_PREFIX=/apm/server/trinitycore-335 \
-DDO_SCRIPTS=1 \
-DDO_TOOLS=1 \
-DDO_CLI=1 \
-DDO_RA=1 \
-DDO_SQL=1 \
-DCENTOS=1

**************************************************************************
cmake ../trinitycore-335/ \
-DCMAKE_INSTALL_PREFIX=/apm/server/trinitycore-335 \
-DACE_LIBRARY=/apm/server/ACE_wrappers/lib/libACE.so \
-DACE_INCLUDE_DIR=/apm/server/ACE_wrappers/include \
-DOPENSSL_LIBRARIES=/usr/lib64 \
-DOPENSSL_INCLUDE_DIR=/usr/lib64 \
-DDO_SCRIPTS=1 \
-DDO_TOOLS=1 \
-DDO_CLI=1 \
-DDO_RA=1 \
-DDO_SQL=1 \
-DCENTOS=1
**************************************************************************

[root@host build-335] make
[root@host build-335] make install
[root@host build-335] cp /apm/server/trinitycore-335/etc/authserver.conf.dist /apm/server/trinitycore-335/etc/authserver.conf
[root@host build-335] cp /apm/server/trinitycore-335/etc/worldserver.conf.dist /apm/server/trinitycore-335/etc/worldserver.conf

 

MySQL에 auth, world, characters DB를생성하고 관리자가 쓸 계정을 각DB의 모든권한으로 연결한다.
Github을 통해서 받은 소스 안에 sql디렉토리내의 sql데이터를 각 DB에 리스토어 한다.
리눅스 방화벽에 3306, 3724, 8085 포트를 개방하여 준다.
authserver.conf와 worldserver.conf의 내용중 DB접속 관련 계정을 관리자 계정으로 변경하여 저장한다.
 

 

Getting Started
I advice you to run/install TrinityCore on a dedicated machine, or a machine that you know you have full control over.
It is recommended that you DO NOT install the software on a shared server solution or any server where other users may have access or might require resources to be available at all times.

Requirements to Install TrinityCore on Linux
This list gives an absolute minimum of packages required to work with a basic install of  TrinityCore, and is in no way meant as “the ultimate solution of packages”.

Please read the distribution documentation or other guides on other packages / solutions that you might want installed, for example LAMP (Linux w/Apache, MySQL and PHP).

Debian-based distributions
sudo apt-get install build-essential autoconf libtool gcc g++ make cmake subversion mercurial patch wget links zip unzip unrar
sudo apt-get install openssl libssl-dev mysql-server mysql-client libmysqlclient15-dev libmysql++-dev libreadline5-dev zlib1g-dev libbz2-dev

RedHat-based distributions
Redhat-based distributions does not (as far as we know) include CMake by default, and requires extra repositories to be enabled.
Please refer to the distributions archive and/or secondary repositories (ex. RPMForge)
Installation of the packages mentioned underneath will require either root-privileges, or the use of sudo prepended to the respective commands.
yum groupinstall "development tools"
yum groupinstall "development libraries"
yum install gcc-g++ mercurial wget links zip unzip unrar
yum install mysql-server mysql-client mysql-devel
yum install openssl

Not included in default package-repositories (as mentioned above)
yum install cmake

Creating a user to work with
Start with logging in to your Linux-machine and create an account for the server itself – on most recent distributions this can easily be done with the following command :
sudo adduser <username>
Note : Change <username> into the preferred username of your server-account – we will as far as possible avoid using specific usernames in this guide.

Installing ACE (Adaptive Communication Environment)
TrinityCore requires a specific communication-library for inter-process communication, and as such needs special attention on that matter.
Due to that most distributions (even the most recent ones) does not supply the version required by TrinityCore as part of their basepackages by default.
To start the installation, log in to your previously created user :
su - <username>
cd ~/

Replace <username> with the username you chose when creating the account.

Downloading and unpacking the ACE-library
wget http://download.dre.vanderbilt.edu/previous_versions/ACE-5.7.8.tar.gz
tar xvzf ACE-5.7.8.tar.gz
cd ~/ACE_wrappers/ mkdir build
cd build


Configuring, compiling and installing ACE
IMPORTANT : If you are the owner of the machine, and at this stage want the ACE-library to be available for other users on your Linux-machine (and also making it easier for yourself at later stages), please follow alternative 2.

Alternative 1 : Local installation
../configure --prefix=/home/<username>/.sys/
make
make install

Again, replace <username> with the username you chose when creating the account.

Alternative 2 : Systemwide installation
../configure
make
sudo make install

As stated above, alternative 2 will build the library as a user without any specific privileges, and then install it into /usr/local as root (the superuser), reachable for other users that wish to use it for their own projects.It is safe safe to allow this library to be installed system wide.

Installing libMPQ (MoPaQ) MPQ-reader library

Configuring, compiling and installing libMPQ
IMPORTANT : If you are the owner of the machine, and at this stage want the MPQ-library to be available for other users on your Linux-machine (and also making it easier for yourself at later stages), please follow alternative 2
Change directory to <your-sourcedir>/externals/libmpq/ before doing this

Alternative 1 : Local installation
./autogen.sh
./configure --prefix=/home/<username>/.sys/
make
make install

Again, replace <username> with the username you chose when creating the account.

Alternative 2 : Systemwide installation
./autogen.sh
./configure
make sudo
make install

As stated above, alternative 2 will build the library as a user without any specific privileges, and then install it into /usr/local as root (the superuser), reachable for other users that wish to use it for their own projects.It is safe safe to allow this library to be installed system wide.

Installing OpenSSL (as known as libSSL)
The procedure described here has been created on a time that the version 0.9.8n was the newest one, it should also work on newer ones.
So if you want a newer (or maybe older) version check ftp://ftp.debian.org/debian/pool/main/o/openssl/

32-bit Debian-based distributions

wget ftp://ftp.debian.org/debian/pool/main/o/openssl/libssl-dev_0.9.8n-1_i386.deb
wget ftp://ftp.debian.org/debian/pool/main/o/openssl/libssl0.9.8_0.9.8n-1_i386.deb
wget ftp://ftp.debian.org/debian/pool/main/o/openssl/openssl_0.9.8n-1_i386.deb

sudo dpkg -i libssl-dev_0.9.8n-1_i386.deb
sudo dpkg -i libssl0.9.8_0.9.8n-1_i386.deb
sudo dpkg -i openssl_0.9.8n-1_i386.deb

64-bit Debian-based distributions

wget ftp://ftp.debian.org/debian/pool/main/o/openssl/libssl-dev_0.9.8n-1_amd64.deb
wget ftp://ftp.debian.org/debian/pool/main/o/openssl/libssl0.9.8_0.9.8n-1_amd64.deb
wget ftp://ftp.debian.org/debian/pool/main/o/openssl/openssl_0.9.8n-1_amd64.deb

sudo dpkg -i libssl-dev_0.9.8n-1_amd64.deb
sudo dpkg -i libssl0.9.8_0.9.8n-1_amd64.deb
sudo dpkg -i openssl_0.9.8n-1_amd64.deb

Other distributions
For cases where you want to run an even newer release of OpenSSL than mentioned here, or your distribution not supplying a version that isn’t of recent date, please check your distributions repositories or documentation.
You can also retrieve it as sourcecode at http://openssl.org/source (feel free to use newer packages if you really feel like it). To build it from source code, here’s a primer :

wget http://openssl.org/source/openssl-0.9.8n.tar.gz

tar -xvf openssl-0.9.8n.tar.gz
cd openssl-0.9.8n

Alternative 1 : Local installation
./config --prefix=/home/<username>/.sys shared
make
make install

Replace <username> with the username you chose when creating the account.

Alternative 2 : Systemwide installation
./config shared
make
sudo make install

Please note that any old revision of the OpenSSL package installed by the distribution may/will interfere with the new version. See your distribution documentation for information on how to remove it to be able to use the new one.

If you have done the systemwide install, you will no longer need any extra parameters for SSL when compiling TrinityCore.

Optional software
These tools are only needed or useful if you are connecting from a Windows host to your Linux machine
Graphical database-viewing/editing
HeidiSQL
SQLyog
Please note that the software called Navicat is NOT supported due to issues with how it handles SQL-files with “/* */”-style comments. It is advised that you stay well clear of this program unless you really are looking for issues.

Remote console connects to the server
Putty
Putty Tray

Filetransfer through SFTP or FTP
WinSCP

Building the server itself

Getting the sourcecode
cd ~/
hg clone http://trinitycore.googlecode.com/hg/ trinitycore

 

git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git trinitycore-335
git clone -b 6.x git://github.com/TrinityCore/TrinityCore.git trinitycore-6x

 


A directory trinitycore will be created automatically and all the source files will be stored in there.

Compiling the Source Code

Creating the build-directory
To avoid issues with updates and colliding sourcebuilds, we create a specific build-directory, so we avoid any possible issues due to that (if any might occur)
mkdir build
cd build

To configure the core, we use space-separated parameters attached to the configuration-tool (cmake) – do read the entire section before even starting on the configuration-part.
This is for your own good, and you HAVE been warned. A full example will also be shown underneath the explanations.
cmake ../trinitycore/ [additional parameters]

Parameter explanations

-DPREFIX=<path to install core and tools> (path where your compiled core/tools and libraries will be stored/installed to)
-DACE_LIBRARY=<path to ACE library> (path to your libACE.so file – do not use if you have ACE installed systemwide)
-DACE_INCLUDE_DIR=<path to ACE includes/headers> (path to the libACE include directory – do not use if you have ACE installed systemwide)
-DOPENSSL_LIBRARIES=<path to OpenSSL libraries> (path to your OpenSSL libraries directory – do not use if you have OpenSSL installed systemwide)
-DOPENSSL_INCLUDE_DIR=<path to OpenSSL includes> (path to your OpenSSL includes directory – do not use if you have OpenSSL installed systemwide)

-DDO_SCRIPTS=1 (compile core with scripts * )
-DDO_TOOLS=1 (compile core with extractiontools for maps and vmaps)
-DDO_CLI=1 (compile core with command line interface support * )
-DDO_RA=1 (compile core with remote access console support)
-DDO_SQL=1 (copy sql files to target directory when installing)
-DCENTOS=1 (use this for Centos/RH/Fedora and RedHat-based distributions)

Note : * means “used by default”, and does not need to be set.
The above parameters when combined into a full example :
cmake ../trinitycore/ -DPREFIX=/home/<username>/server -DDO_RA=1 -DDO_SQL=1

The above will turn on the remote console access system, and install the SQL-files into the server-directory under the /home/<username>/server/shared/trinity/sql/ directory.
Note that you WILL have to configure the server well if you ever want to use the RA-access functionality.
Note: New users are advised NOT to use the RA-feature without understanding the security-implications involved!

Building the core
After configuring and checking that everything is in order (read cmakes output), you can build Trinity (this will take some time unless you are on a rather fast machine)
make
make install

If you have multiple CPU cores, you can enable the use of those during compile :
make -j <number of cores>
make install

After compiling and installing, you will find your core binaries in /home/<username>/server/bin, and the standard configuration files in the /home/<username>/server/etc folder.
(As usual, replace <username> with the username you created earlier). Now you can continue reading on and learn how how to update the sourcetree.

Keeping the code up to date
TrinityCore developers are always at work fixing and adding new features to the core. You can always check them here.(Link http://code.google.com/p/trinitycore/source/list) To update the core files, do the following :
cd ~/trinitycore/
hg pull -u

Now return to the compilation-section again, and repeat the instructions there.

Installing the databases

Fetching the databases
Simply type in the users homedirectory the following :
hg clone http://trinitydb.googlecode.com/hg/ trinitydb
A folder trinitydb will be created and all files will be stored in there.

About the MySQL server installation

When configuring MySQL make sure you remember the password you set for the default root account and that you enabled both MyISAM and InnoDB engines. You can leave all the other settings as default.
You might want to enable remote access to your MySQL server if your are also testing a website for your Trinity server or if you have friends testing with you which need access from remote locations.
Remember that this will decrease the security of your MySQL server in general, and is not adviced without prior knowledge on how to secure it.

Installing the Trinity DataBase Project (TDB) Database
NOTE: This guide is only for a fresh and new installation of TDB, so do not follow this if you already have a working database. You have been warned, all database content will disappear if you do.
A short primer on what the databases do
Trinity needs three databases to run:
realmd
(contains realm- and account-data (logins/passwords and accesslevels ++)
characters
(contains characterdata and certain worldstates)
world
(contains gamecontent such as spawns, quests, stats, quests, etc.)

Installing the databases
The first two are taken from the core installation directory, while the world database is taken from the TDB directory.
Create the three databases by importing /home/<username>/server/sql/create_mysql.sql – you now have three databases called realmd, characters and world.
Import realmd database structure by importing /home/<username>/trinitycore/sql/realmd.sql
Import characters database structure by importing /home/<username>/trinitycore/sql/characters.sql
Unzip /home/<username>/trinitydb/fulldb/TDB_333.9.29_7925.zip and import world DB structure and contents by importing TDB_333.9.29_7925.sql in the world DB.
Import in the world DB the following files in this precise order:

/home/<username>/trinitydb/updates/333.9/30_01_corepatch_world_7925_8307.sql
/home/<username>/trinitydb/updates/333.9/30_02_procedures_world.sql
/home/<username>/trinitydb/updates/333.9/30_03_updatepack_world.sql

Import all *.sql update files from /home/<username>/trinitycore/sql/updates/ which start with a number above ‘8307’ so that your DB structure is up to date with the revision you just pulled and compiled.

Also note that we STILL use the generic <username> extension here, use the username you created for the server earlier!

Now your world database-structure is for TrinityCore revision 8307. You need to import the update files to have the proper world/characters/realmd database-structures for the revision you just pulled and compiled.

You will notice they are all named XXXX_world_tablename.sql or XXXX_characters_tablename.sql or XXXX_realmd_tablename.sql – make sure to import these into the correct database.

XXXX_world_tablename.sql —> world database
XXXX_characters_tablename.sql —> characters database
XXXX_realmd_tablename.sql —> realmd database

Keeping the database up to date
TDB developers are always at work fixing and adding new data to the database, but unlike core development, database updatepacks come more on a 1-2 times a month basis with many fixes from here and a lot of new data from developers and contributors.
We’ll use the same procedure as for updating core, just on the databasefiles instead.
cd ~/trinitydb
hg pull -u

Setting up the server
Now that you have the source compiled and the databases installed, you need to set up the server.

Extracting dbc, maps and vmaps files
In order to run, TrinityCore needs dbc- and map-files. In addition, if you want to enable vmaps (Making NPCs unable to see through walls etc.) you will need to extract them as well.
Warning: use Trinity’s extractors. If you use extractors from other projects it is almost certain that your Trinity Core will not recognize the extracted data!

To get the Trinity extractors you have to build the project with option -DDO_TOOLS=1 (#Parameter explanations).

dbc and maps files
cd <your WoW client directory>
/home/<username>/server/bin/mapextractor
cp -r dbc maps /home/<username>/server/data

Visual Maps (aka vmaps – optional)
You can also extract vmaps which will take quite a while depending on your machine (1-2 hours).
cd <your WoW client directory>
/home/<username>/server/bin/vmap3extractor
mkdir vmaps
/home/<username>/server/bin/vmap3assembler Buildings vmaps
cp -r vmaps /home/<username>/server/da
ta

Configuring the server
First of all you need to create 2 files : worldserver.conf and authserver.conf in your /home/<username>/server/etc/ folder.
You’ll find 2 files named worldserver.conf.dist and authserver.conf.dist. Copy these to their namesakes without the .dist extension.
cp worldserver.conf.dist worldserver.conf
cp authserver.conf.dist authserver.conf

Now you can go ahead and edit the two files (worldserver.conf and authserver.conf) to your liking, with the following notes in mind about them.

trinitycore.conf
Edit MySQL account username and password (instead of trinity;trinity).

LoginDatabaseInfo = “127.0.0.1;3306;trinity;trinity;realmd”
WorldDatabaseInfo = “127.0.0.1;3306;trinity;trinity;world”
CharacterDatabaseInfo = “127.0.0.1;3306;trinity;trinity;characters”
If you extracted vmaps then edit the following :
vmap.enableLOS = 1 <— set this to 1
vmap.enableHeight = 1 <— set this to 1
vmap.ignoreMapIds = “369”
vmap.ignoreSpellIds = “7720”
vmap.petLOS = 1 <— set this to 1

trinityrealm.conf
Edit MySQL account username and password (instead of trinity;trinity).
LoginDatabaseInfo = “127.0.0.1;3306;trinity;trinity;realmd”
You need to make sure that the authserver directs incoming connections to your realm.
In the realmd database there is a table called realmlist, where you need to edit the field address according to your needs
127.0.0.1                — Leave default localhost if you are connecting alone from the same machine TrinityCore runs on.
<Your LOCAL NETWORK ip>  — Use the machine’s LAN ip if you want other computers from the same network as the TrinityCore server to connect to your server.
<Your PUBLIC NETWORK ip> — Use your PUBLIC ip if you have friends and testers which need to connect your server from the internet.

Warning: The TrinityCore development team/owners and the TrinityDB team/owners DO NOT in any case sponsor nor support illegal public servers. If you use these projects to run an illegal public server and not for testing and learning it is your own personal choice.

Notes/Revisions

-DLARGE_CELL=0         has been deprecated and is not used at all (remove this if ever used before)
-DDO_MYSQL=1           has been deprecated and is not used at all (remove this if ever used before)
-DSSLLIB=<path>        has been deprecated and is not used at all (remove this if ever used before)
-DDO_DEBUG=0           not required, as its default is : 0
-DDO_RA=0              not required, as its default is : 0

The new method for custom SSL-libraries are:
-DOPENSSL_LIBRARIES=<path to OpenSSL libraries directory>
-DOPENSSL_INCLUDE_DIR=<path to OpenSSL includes directory>

The paths for installation can be done without any other parameters but this :

-DPREFIX=/path/to/where/you/want/core/to/be/installed

It will create the following structure:

<path>/bin/             – binaries will be placed here
<path>/etc/             – configfiles will be placed here

Also, compile has been tested on Debian 5.0.4 x32/x64, Ubuntu 10.04 x32/x64, Centos 5.4 x32/x64 – all without problems IF YOU DO NOT MESS AROUND ON YOUR OWN!

Do NOT add your own compiled libraries on recent distributions, this is not required, and will only lead to confusion. If you face any problems in configuring World of Warcraft Private Server on Linux, let me know, I will try to help.

Disclaimer: The TrinityCore Development Team and Owners, the TrinityDB Team and Owners, SegmentNext and the writer of this article DO NOT in any case sponsor nor support illegal public servers. If you use these projects to run an illegal public server and not for testing and learning it is your own personal choice.

 

 

 

 

 

 

 

 

 

 

 

 

 

27. Database Config

 root@vTrinity13:~/TrinityCore/sql/create# mysql -u root p < create_mysql.sql

                  

  • 28. Database Config
  •  mysql> show databases;
  •  +--------------------+
  •  | Database |
  •  +--------------------+
  •  | auth |
  •  | characters |
  •  | world |
  •  +--------------------+
  •  7 rows in set (0.01 sec)
  •                   
  • 29. Database Config
  •  root@vTrinity13:~/TrinityCore/sql# cat create/create_mysql.sql GRANT USAGE ON * . * TO 'trinity'@'localhost' IDENTIFIED BY 'trinity' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ; CREATE DATABASE `world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON `characters` . * TO 'trinity'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON `auth` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
  •                   
  • 30. Database Config
  •  root@vTrinity13:~/TrinityCore/sql/base# mysql -u trinity p auth < auth_database.sql
  •  root@vTrinity13:~/TrinityCore/sql/base# mysql -u trinity p characters < characters_database.sql
  •                   
  • 31. Database Config
  •  root@vTrinity13:/home/joo/TDB_full_335. 52_2013_07_17# mysql -u trinity -p world < TDB_full_335. 52_2013_07_17.sql
  •                   
  • 32. Database Config
  •  root@vTrinity13:~/TrinityCore/sql/updates/world# mysql -u trinity -p world < 2013_07_17_00_world_version.sql
  •  Enter password:
  •                   
  • 33. Realmlist table You need to make sure that the authserver directs incoming connections to your realm. In the auth database there is a table called realmlist, where you need to edit the field *address* according to your needs :
  •                   
  • 34. Realmlist table 127.0.0.1
  •  -- Leave default localhost if you are connecting alone from the same machine TrinityCore runs on.< Your LOCAL NETWORK ip>
  •  -- Use the machine's LAN ip if you want other computers from the same network as the TrinityCore server to connect to your server.< Your PUBLIC NETWORK ip>
  •  -- Use your PUBLIC ip if you have friends and testers which need to connect your server from the internet.
  •                   
  • 35. Realmlist table An example of how it would look with a real address: use auth; update realmlist set address = '192.168.56.1' where id = 1;
  •                   
  • 36. Realmlist table
  •  mysql> describe realmlist;
  •  +----------------------+----------------------+------+-----+---------------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+----------------------+------+-----+---------------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(32) | NO | UNI | | | | address | varchar(255) | NO | | 127.0.0.1 | | | localAddress | varchar(255) | NO | | 127.0.0.1 | | | localSubnetMask | varchar(255) | NO | | 255.255.255.0 | | | port | smallint(5) unsigned | NO | | 8085 | | | icon | tinyint(3) unsigned | NO | |0 | | | flag | tinyint(3) unsigned | NO | |2 | | | timezone | tinyint(3) unsigned | NO | |0 | | | allowedSecurityLevel | tinyint(3) unsigned | NO | |0 | | | population | float unsigned | NO | |0 | | | gamebuild | int(10) unsigned | NO | | 12340 | | +----------------------+----------------------+------+-----+---------------+----------------+ 12 rows in set (0.00 sec)
  •                   
  • 37. Realmlist table
  •  mysql> update realmlist set address = '192.168.56.1' where id = 1;
  •  Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from realmlist where id = 1; +----+---------+-----------+--------------+-----------------+------+------+------+----------+---------------------+------------+-----------+ | id | name | address | localAddress | localSubnetMask | port | icon | flag | timezone | allowedSecurityLevel | population | gamebuild | +----+---------+-----------+--------------+-----------------+------+------+------+----------+---------------------+------------+-----------+ | 1 | Trinity | 192.168.56.1 | 127.0.0.1 | 255.255.255.0 | 8085 | 1 | 0 | 1| 0| 0| 12340 | +----+---------+-----------+--------------+-----------------+------+------+------+----------+---------------------+------------+-----------+ 1 row in set (0.00 sec)
  •                   
  • 38. Check version
  •  mysql> select * from version;
  •  +-----------------------------------------------------------------------------------------+---------------+-----------+----------+ | core_version | core_revision | db_version | cache_id | +-----------------------------------------------------------------------------------------+---------------+-----------+----------+ | TrinityCore rev. 394b2c684553 2013-07-29 21:46:49 +0100 (master branch) (Unix, Release) | 394b2c684553 | TDB 335.52 | 52 | +-----------------------------------------------------------------------------------------+---------------+-----------+----------+ 1 row in set (0.00 sec)
  •                   
  • 39. DB update script #!/bin/bash FILES=~/TrinityCore/sql/updates/dbname/*.* for f in $FILES do echo "Processing $f file..." mysql --password=password dbname < $f done
  •                   
  • 40. TrinityCore Setting up the Server config
  •                   
  • 41. Extracting dbc, maps and vmaps files In order to run, TrinityCore needs dbc- and map-files. In addition, if you want to enable vmaps (Making NPCs unable to see through walls etc.) you will need to extract them as well.
  •                   
  • 42. dbc and maps files cd <your WoW client directory> /home/<username>/server/bin/mapextractor mkdir /home/<username>/server/data cp -r dbc maps /home/<username>/server/data
  •                   
  • 43. vmaps and mmaps files cd <your WoW client directory> /home/<username>/server/bin/vmap4extractor mkdir /home/<username>/server/data/vmaps mkdir /home/<username>/server/data/mmaps cp -r vmaps mmaps /home/<username>/server/data cp Buildings/* /home/<username>/server/data/vmaps
  •                   
  • 44. Configuring the server First of all you need to create 2 files : worldserver.conf and authserver.conf in your /home/<username>/server/etc/ folder. You'll find 2 files named worldserver.conf.dist and authserver.conf.dist. Copy these to their namesakes without the .dist extension. cp worldserver.conf.dist worldserver.conf cp authserver.conf.dist authserver.conf
  •                   
  • 45. worldserver.conf Edit MySQL account username and password (instead of trinity;trinity).
  •  LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity; auth"
  •  WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity; world"
  •  CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity; characters"
  •                   
  • 46. worldserver.conf
  •  vmap.enableLOS = 1
  •  -- set this to 0 vmap.enableHeight = 1
  •  -- set this to 0 vmap.petLOS = 1
  •  -- set this to 0 vmap.enableIndoorCheck = 1
  •  -- set this to 0
  •                   
  • 47. worldserver.conf
  •  WorldServerPort = 8085
  •  RealmServerPort = 3724
  •                   
  • 48. Check a port
  •  root@vTrinity13:/home/joo/server/etc# netstat -a |grep 8085 tcp 0 0 *:8085 *:* LISTEN
  •  root@vTrinity13:/home/joo/server/etc# netstat -a |grep 3724 tcp 0 0 *:3724 *:* LISTEN
  •                   
  • 49. Check a port from PC to Server
  •  C:>telnet 192.168.56.1 3724
  •  C:>telnet 192.168.56.1 8085
  •                   
  • 50. authserver.conf Edit MySQL account username and password (instead of trinity;trinity). LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"
  •                   
  • 51. NAT port forwarding in Virtulbox
  •                   
  • 52. TrinityCore Getting start
  •                   
  • 53. Server directory
  •                   
  • 54. WorldServer
  •                   
  • 55. Create account You can type commands inside the worldserver program, similar to a command prompt. Type: account create <user> <pass> Example: account create test test Type: account set gmlevel <user> 3 -1 Example: account set gmlevel test 3 -1 DO !NEVER! create an account directly into your database unless you are ABSOLUTELY SURE that you know what and how to do! The "3" is the GM account level (higher numbers = more access), and the "-1" is the realm ID that stands for "all realms".
  •                   
  • 56. AuthServer
  •                   
  • 57. Wow Client realmlist.wtf
  •                   
  • 58. Future configuration Client - Windows 8 ● Wow Client WoW Client Server - Virtual box, Ubuntu 13.04 ● Game Server ○ auth ○ world ● Database Server ○ auth, world, character Auth Server World Server auth db world db character db

 

 

간단한 서버구축방법을 설명드리겠습니다.

 

1. 우분투를 설치합니다.

   테스크탑버젼관 서버버젼이 있는데...서버버젼을 추천합니다.

 

2. 컴파일용 라이브러리 설치합니다.

 

  데스크탑버젼과 서버버젼에세의 설치는 같으나 서버버젼은 부팅이 텍스모드로 부팅이되고 데스크탑번젼은

  GUI모드로 부팅이됩니다.  그래서 데스트탑버젼에서는 터미널을 하나 열어서 하시던지 텍스트 모드로 전환

  Ctrl + Alt + F1 을누르시면 1번 터미널로 전환됩니다.. F6번까지 6개의 터미널을 열어서 사용하실수있습니다.

 

 텍스트모드에서

sudo apt-get install build-essential autoconf libtool gcc g++ make cmake git-core mercurial patch wget links zip unzip unrar
apt-get 명령어를 사용하여 위 라이브러리를 설치합니다.

root계정에서 하실때는 sudo를 않붙히셔도 됩니다.

 

sudo apt-get install openssl libssl-dev mysql-server mysql-client libmysqlclient15-dev libmysql++-dev libreadline5-dev zlib1g-dev libbz2-dev
한번더 위 명령어를 실행합니다.

 

위 과정에서는 mysql을 깔기때문에 mysql관련 패스워드를 설정하는 과정이 나옵니다.

 

3.이제 서버로 사용할계정을 생성  이동합니다.

sudo adduser <username>

username 를 bt로 설정하겠습니다.

su - bt

 

bt계정으로 이동됩니다.

 

4. ACE라이브러리 설치합니다.

wget http://download.dre.vanderbilt.edu/previous_versions/ACE-5.7.8.tar.gz

tar xvzf ACE-5.7.8.tar.gz

cd ~/ACE_wrappers/mkdir build

cd build

../configure --prefix=/home/<username>/.sys/makemake install

 

make과정에서 시간이 좀 소요됩니다.

 

5.외부접속및 관리를 위하여 ftp랑 putty를 설치합니다.

sudo apt-get install vsftpd ssh

 

외부접속을위해서 설청을 변경해줍니다.

cd /etc/mysql

vi my.cnf

bain 127.0.0.1 이라고 되어있는 부분의 #으로 주석처리해줍니다.

 

cd /etc/

vi ftpuesrs.conf

root 부분을 주석처리해줍니다.

root 계정에서

mysql -u root -p

패스워드 입력하시고

use mysql

insert into user (host,user,password) values ('%','외부접속에이용할아이디',password('패스워드'));

grant all privileges on *.* to 아이디@'%. identified by 'password'

flush privileges;

이제 외부에서 디비 ftp putty 접근이가능합니다.

 

자이제 소스를 다운받습니다.

cd ~/

git clone git://github.com/TrinityCore/TrinityCore.git

TrinityCore 디렉토리에 소스가 다운받아졌습니다. 대소문자 구분하셔야합니다.

이제 원도우가 설치된컴으로 이동하셔서 putty로 접속해서 하셔도 되고

바로 하셔도 됩니다.

터미널모드에서..

소스디렉토리로 이동합니다.

계정은 서버로 사용할계정에서 작업하셔야합니다.

cd TrinityCore

cmake -DPREFIX=/home/bt/server -DACE_LIBRARY=/home/bt/.sys/lib/libACE.so -DACE_INCLUDE_DIR=/home/bt/.sys/include/

여기서 bt는 서버로 사용할계정명이며 server는 컴파일할 디렉토리입니다. 대소문자 구분해야합니다.

cmake가 끝나면..

make

make install

자이제 bt계정 server 디렉토리에 서버가 컴파일되었습니다.

윈도우컴에서 나비켓으로 서버에 접속합니다.

렐름,케릭터,월드 3개의 디비를 생성합니다. utf-8형태로 생성합니다.

ftp로 서버에 접속해보시면 소스 디렉토리 않이 sql디렉토리가 있습니다.

여기의 배이스디렉토리에 3개의 디비가 존재합니다.

이걸 아까 생성하신 디비에 리스토어 해줍니다.

여기서 월드 디비가 3종류됩니다. ctdb,tdb,ytdb 편하실걸받아서 배이스디렉토리의 월드디비대신 리스토어하시고

update디렉토리안에서 받으신 db의 지원버젼보다 높은것들은 전부 리스토어 해줍니다.

월드디비 리스토어에 2가지 방법이 존재하는 택입니다.

랠름 디비안에 보시면 랠림리스트라는 테이블이있습니다.

여기 보시면 ip 127.0.0.1 로 되어있습니다.

이걸 우분투서버 ip변경해주세요..

아이피 확인은 ifconfig 터미널모드에서 치시면 나옵니다.

자 이제 서버실행만 하시면 접속이됩니다.

크래쉬등 프로세서가 꺼지면 리스타트되게 실행하시면됩니다.

1번터미널에서

unitl

/home/bt/server/bin/worldserver -c /home/bt/server/etc/worldserver.conf 2>&1

do

sleep 1

done

 

월드서버를 월드서버콘피그를 참조해서 실행시키고 프로세서가 1초가 감지가 않되면 재실행하라는 명령어입니다.

 

authserver도 같은형태로 2번터미널에서 실행시켜줍니다.

이제 와우폴더의 랠름리스트를 변경하시고 접속하시면됩니다.

List of Articles
번호 제목 글쓴이 날짜 조회 수
249 CentOS APM 소스 설치 file [15] LynX 2015-05-29 1053
248 CentOS apm소스 [9] LynX 2015-05-29 835
247 CentOS postfix dovecot roundcube [10] LynX 2015-05-08 582
246 Network GNS3 상세 설정 file [26] LynX 2015-04-29 3110
245 Network GNS3 메뉴 , VPCS file [34] LynX 2015-04-29 1794
244 Network NAT 구성 file [13] LynX 2015-04-29 921
243 Network HSRP 구성 file [20] LynX 2015-04-29 802
242 Network EtherChannel / Spanning-Tree file [14] LynX 2015-04-29 489
241 Network VLAN 설정 ② Trunk mode / Routing file [12] LynX 2015-04-29 596
240 Network VLAN 설정 ① Access mode file [27] LynX 2015-04-29 4269
239 Linux musescore LynX 2015-03-28 3778
238 Linux Error in FS_Check LynX 2015-03-19 442
237 Linux ODBC 설정 [30] LynX 2015-03-18 1726
236 Linux Bomi Player [24] LynX 2015-02-27 975
235 CentOS apache.service LynX 2015-02-25 414
234 HTML Tag css, cascading style sheets, 스타일 정의 방법 [9] LynX 2015-02-06 1832
233 HTML Tag HTML문서에 CSS를 사용하는 3가지 방법 LynX 2015-02-06 352
232 SoftWare 포토샵 버튼 [17] LynX 2015-01-27 416
231 Linux Linux 환경에서 ACE framework 설치하기 [11] LynX 2015-01-12 690
» Linux WOW server [13] LynX 2015-01-11 1847

XE Login