安装编译环境

Debian :

apt-get install grep build-essential gcc g++ automake git-core
autoconf make patch cmake libmysql++-dev libtool
libssl-dev binutils zlibc libc6 libbz2-dev subversion
libboost-all-dev

mkdir /opt/mangos-server
mkdir /opt/mangos-server/share
mkdir /opt/mangos-server/logs
chown mangos:mangos /opt/mangos-server -R

编译

adduser mangos
su - mangos

git clone https://github.com/cmangos/mangos-tbc.git mangos
git clone https://github.com/cmangos/tbc-db.git database

cd ~
mkdir build && cd build
cmake ../mangos -DCMAKE_INSTALL_PREFIX=/opt/mangos-server -DBUILD_EXTRACTOR=ON -DBUILD_VMAP_EXTRACTOR=ON -DBUILD_MMAP_EXTRACTOR=ON -DPCH=1 -DDEBUG=0
make
make install

安装LNMP

导入数据库

cd ~/mangos/sql/create
mysql -uroot -prootmysql < db_create_mysql.sql

cd ~/mangos/sql/base
mysql -umangos -pmangos characters < characters.sql
mysql -umangos -pmangos mangos < mangos.sql
mysql -umangos -pmangos realmd < realmd.sql

cd ~/database
./InstallFullDB.sh

vi InstallFullDB.config

MANGOS_DBUSER="mangos"
MANGOS_DBPASS ="mangos"
CORE_PATH="../mangos"

./InstallFullDB.sh

提取data文件

./ad -f 0
./vmap_extractor -l

mkdir vmaps
./vmap_assembler Buildings vmaps

mkdir mmaps
./MoveMapGen.sh 1

##MOVE dbc,maps,vmaps,mmaps TO /opt/mangos-server/share

配置/启动服务器

cd /opt/mangos-server/etc

cp mangosd.conf.dist mangosd.conf
cp realmd.conf.dist realmd.conf

vi mangosd.conf

DataDir = "../share"
LogsDir = "../logs"
BindIP = "127.0.0.1"

vi realmd.conf

LogsDir = "../logs"
BindIP = "127.0.0.1"

cd ~
vi mangosd.sh

cd /opt/mangos-server/bin
./mangosd -c ../etc/mangosd.conf

vi realmd.sh

cd /opt/mangos-server/bin
./realmd -c ../etc/realmd.conf

sh ./mangosd.sh
sh ./realmd.sh

建立账号/游戏版本/GM

account create [username] [password]
account set addon [username] 1
account set gmlevel [username] 3


12947 亚历克斯的勇气戒指 1000防御等级
18970 致命测试戒指2 法术暴击+50%