Skip to content

Instantly share code, notes, and snippets.

@Yehonal
Last active February 24, 2020 07:59
Show Gist options
  • Save Yehonal/c5f04eb9787480ac19d60c55aaff9afb to your computer and use it in GitHub Desktop.
Save Yehonal/c5f04eb9787480ac19d60c55aaff9afb to your computer and use it in GitHub Desktop.
[WIP] Trinitycore full installer & run for Debian 10
#!/usr/bin/env bash
apt-get update -y
apt-get install curl unzip tmux p7zip-full git clang cmake make gcc g++ libmariadbclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev mariadb-server p7zip default-libmysqlclient-dev -y
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100
git clone -b 3.3.5 --depth=2 git://github.com/TrinityCore/TrinityCore.git
cd TrinityCore
mkdir build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=../env/dist/
make -j $(nproc) install
cd ../
cp ./env/dist/etc/authserver.conf.dist ./env/dist/etc/authserver.conf
cp ./env/dist/etc/worldserver.conf.dist ./env/dist/etc/worldserver.conf
curl https://github.com/wowgaming/client-data/releases/download/v7/tc-data.zip -L -o data.zip && unzip data.zip -d ./env/dist/bin && rm data.zip
mysql -e "CREATE USER 'trinity'@'localhost' IDENTIFIED BY 'trinity';"
mysql -e "GRANT ALL PRIVILEGES ON auth.* TO 'trinity'@'%' IDENTIFIED BY 'trinity'; FLUSH PRIVILEGES;"
mysql -e "GRANT ALL PRIVILEGES ON world.* TO 'trinity'@'%' IDENTIFIED BY 'trinity'; FLUSH PRIVILEGES;"
mysql -e "GRANT ALL PRIVILEGES ON characters.* TO 'trinity'@'%' IDENTIFIED BY 'trinity'; FLUSH PRIVILEGES;"
curl https://github.com/TrinityCore/TrinityCore/releases/download/TDB335.20021/TDB_full_world_335.20021_2020_02_15.7z -L -o db.7z && 7z e db.7z -o./env/dist/bin && rm db.7z
tmux new -d -s worldserver -c "./env/dist/bin/" "printf 'y\ny\ny\n' | ./worldserver"
while ! mysql -e 'use auth'; do echo "waiting for auth db creation..."; sleep 3; done
tmux new -d -s authserver -c "./env/dist/bin/" "./authserver"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment