Ubuntu编译安装TrinityCore3.3.5

时间:2017-06-23 15:36:30   收藏:0   阅读:2057

系统:Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-32-generic x86_64) 1核2G

Notice:内存不可过小,否则会编译失败

#安装一堆东西
    4  apt-get update
    5  apt-get install git cmake make gcc g++ libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev
    6  apt-get install libboost-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-iostreams-dev
    7  apt-get install mysql-server p7zip
    8  adduser wow
    9  cd /home/wow/
#安装cmake
   23  cd /data0/package/
   24  wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
   26  tar zxvf cmake-3.2.2.tar.gz 
   28  cd cmake-3.2.2/
   29  ./configure
   30  make && make install
  #安装gcc
   33  apt-get install software-properties-common
   34  add-apt-repository ppa:ubuntu-toolchain-r/test
   35  apt-get update
   36  apt-get install gcc-4.9 g++-4.9
#下载boost
 1824  wget https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
   61  tar zxvf boost_1_55_0.tar.gz 
   62  mv boost_1_55_0 /data0/
#下载安装TrinityCore
   11  git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git
   72  mv TrinityCore-3.3.5 /home/wow/
   75  cd TrinityCore-3.3.5/
   77  mkdir build
   78  cd build/
   83  /usr/local/bin/cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server -DCONF_DIR=/home/wow/server/etc -DTOOLS=1 -DWITH_WARNINGS=1 -DCMAKE_C_COMPILER=/usr/bin/gcc-4.9 -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.9 -DBOOST_ROOT=/data0/boost_1_55_0
   84  make
   85  make install
#导入数据库
mysql -uroot -p
mysql> source /home/wow/TrinityCore/sql/create/create_mysql.sql
mysql> quit
wget https://github.com/TrinityCore/TrinityCore/releases/download/TDB335.61/TDB_full_335.61_2016_04_11.7z
  106  7zr x TDB_full_335.61_2016_04_11.7z 
  108  cd TDB_full_335.61_2016_04_11
  110  cp TDB_full_world_335.61_2016_04_11.sql /home/wow/server/bin/
#运行worldserver导入数据库
  128  cp authserver.conf.dist authserver.conf
  129  cp worldserver.conf.dist worldserver.conf
#修改连接数据库配置
#LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" worldserver.conf / authserver.conf (bnetserver.conf for 6.x)    
#WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity;world" worldserver.conf    
#CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters" worldserver.conf
  130  vim authserver.conf
  131  vim worldserver.conf
#创建地图
  124  cd /mnt/wow_cn_3.3.5.13930/
  125  /home/wow/server/bin/mapextractor 
  127  cp -r dbc maps /home/wow/server/data/

  128  /home/wow/server/bin/vmap4extractor 
  129  mkdir vmaps
  130  /home/wow/server/bin/vmap4assembler Buildings vmaps
  131  cp -r vmaps /home/wow/server/data/

  132  mkdir mmaps
  133  /home/wow/server/bin/mmaps_generator 
  175  cp -r mmaps /home/wow/server/data/
#启动服务
  200  cd /home/wow/server/data/
  134  cd bin/
  136  ./worldserver 
  180  ./authserver
#修改realmlist
mysql> select * from realmlist;
+----+---------+---------------+--------------+-----------------+------+------+------+----------+----------------------+------------+-----------+
| id | name    | address       | localAddress | localSubnetMask | port | icon | flag | timezone | allowedSecurityLevel | population | gamebuild |
+----+---------+---------------+--------------+-----------------+------+------+------+----------+----------------------+------------+-----------+
|  1 | GodsWar | 123.56.72.137 | 127.0.0.1    | 255.255.255.0   | 8085 |    0 |    0 |        1 |                    0 |          0 |     13930 |
+----+---------+---------------+--------------+-----------------+------+------+------+----------+----------------------+------------+-----------+
1 row in set (0.00 sec)
#重启服务
  136  ./worldserver 
  180  ./authserver
#客户端修改方法
创建realmlist.wtf放在客户端根目录
E:\下载文件\wow_cn_3.3.5.13930\realmlist.wtf

里面写
SET realmlist 123.56.72.137 
保存

#或者写一个bat脚本
#客户端修改,bat脚本内容
echo y | rd /s "Cache"
echo SET realmlist "123.56.72.137" > realmlist.wtf
start wow.exe
goto end

#遇到了服务器离线的问题
修改数据库auth里的realmlist,将gamebuild 修改成客户端版本

技术分享

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!