servers:games:cmangos_classic
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:games:cmangos_classic [2023/06/27 17:20] – Sean Rhone | servers:games:cmangos_classic [2024/03/12 10:54] (current) – removed Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Information ====== | ||
- | |||
- | * CMaNGOS ((https:// | ||
- | * mangos-classic ((https:// | ||
- | * [[Information: | ||
- | * wow.realmofespionage.xyz ((WoW '' | ||
- | |||
- | ===== Prerequisites ===== | ||
- | |||
- | * [[distros: | ||
- | * [[servers: | ||
- | * [[games: | ||
- | |||
- | ===== Notes ===== | ||
- | |||
- | * :!: 2023/06/27: This is copy/pasted from TC 3.3.5 notes and is a large TODO | ||
- | * [[https:// | ||
- | |||
- | ====== Create Group and User ====== | ||
- | |||
- | **** | ||
- | |||
- | sudo groupadd ' | ||
- | |||
- | ====== Dependencies ====== | ||
- | |||
- | ===== Packages ===== | ||
- | |||
- | * https:// | ||
- | |||
- | sudo dnf install git make cmake gcc patch autoconf mariadb-server mariadb-devel libtool zfstream gcc-c++ subversion boost-devel boost-static bzip2-devel | ||
- | |||
- | ====== Firewall ====== | ||
- | |||
- | * 3724/tcp is realmd and needs forwarded from the router also for WAN | ||
- | * 8085/tcp is mangosd and needs forwarded from the router also for WAN | ||
- | |||
- | sudo firewall-cmd --add-port=' | ||
- | |||
- | sudo firewall-cmd --add-port=' | ||
- | |||
- | ====== Download Sources ====== | ||
- | |||
- | sudo su ' | ||
- | |||
- | cd ~ && mkdir -p ~/' | ||
- | |||
- | cd ~ && mkdir -p ~/' | ||
- | |||
- | exit | ||
- | |||
- | ====== Databases ====== | ||
- | |||
- | ===== Initial ===== | ||
- | |||
- | * This creates the '' | ||
- | |||
- | sudo mysql | ||
- | |||
- | CREATE DATABASE authserver; | ||
- | |||
- | GRANT ALL PRIVILEGES ON authserver.* to ' | ||
- | |||
- | CREATE DATABASE characters; | ||
- | |||
- | GRANT ALL PRIVILEGES ON characters.* to ' | ||
- | |||
- | CREATE DATABASE worldserver; | ||
- | |||
- | GRANT ALL PRIVILEGES ON worldserver.* to ' | ||
- | |||
- | FLUSH PRIVILEGES; | ||
- | |||
- | EXIT | ||
- | |||
- | ====== Compile ====== | ||
- | |||
- | * [[https:// | ||
- | |||
- | sudo su ' | ||
- | |||
- | rm -Rf ~/' | ||
- | |||
- | exit | ||
- | |||
- | ====== Extractors ====== | ||
- | |||
- | * Copies '' | ||
- | |||
- | rm -Rf '/ | ||
- | |||
- | ====== Content ====== | ||
- | |||
- | ===== Transfer Extractors to Client ===== | ||
- | |||
- | * :!: Run on the machine doing the content extraction | ||
- | * See [[games: | ||
- | |||
- | mkdir -p '/ | ||
- | |||
- | ===== Dependencies ===== | ||
- | |||
- | * :!: Run on the machine doing the content extraction | ||
- | |||
- | sudo dnf install ' | ||
- | |||
- | ===== Extract and Generate Content ===== | ||
- | |||
- | ==== DBCs, Maps, and Cameras ==== | ||
- | |||
- | * :!: Run on the machine doing the content extraction | ||
- | * 20230627: Takes less than a minute with an i5-8400H | ||
- | |||
- | cd ~/' | ||
- | |||
- | ==== VMaps ==== | ||
- | |||
- | === Extract === | ||
- | |||
- | * :!: Run on the machine doing the content extraction | ||
- | * 20230627: Takes about a minute with an i5-8400H | ||
- | |||
- | cd ~/' | ||
- | |||
- | === Assemble === | ||
- | |||
- | * :!: Run on the machine doing the content extraction | ||
- | * 20230627: Takes less than a minute with an i5-8400H | ||
- | |||
- | cd ~/' | ||
- | |||
- | ==== MMaps ==== | ||
- | |||
- | * :!: Run on the machine doing the content extraction | ||
- | * 20230627: Started 04:56 | ||
- | |||
- | cd ~/' | ||
- | |||
- | ===== Archive Content ===== | ||
- | |||
- | * Should be around 1.5GB | ||
- | * :!: Run on the machine that did the content extraction | ||
- | |||
- | cd ~/' | ||
- | |||
- | ===== Transfer Content to Server ===== | ||
- | |||
- | * Should be around 3.6GB | ||
- | * :!: Run on the machine that did the content extraction | ||
- | |||
- | cd ~/' | ||
- | |||
- | ===== Cleanup on Client ===== | ||
- | |||
- | * :!: Run on the machine that did the content extraction | ||
- | |||
- | gio open ~/' | ||
- | |||
- | ===== Move Content on Server ===== | ||
- | |||
- | * Moves the '' | ||
- | * :!: Run on the machine that is **running the server** | ||
- | |||
- | ls ~/' | ||
- | |||
- | sudo restorecon -F -I -R '/ | ||
- | |||
- | ====== Settings ====== | ||
- | |||
- | ===== realmd ===== | ||
- | |||
- | ==== Copy ==== | ||
- | |||
- | sudo su ' | ||
- | |||
- | cp ~/' | ||
- | |||
- | ==== Settings ==== | ||
- | |||
- | sudo su ' | ||
- | |||
- | ~/' | ||
- | |||
- | < | ||
- | x</ | ||
- | |||
- | ===== mangosd ===== | ||
- | |||
- | ==== Copy ==== | ||
- | |||
- | sudo su ' | ||
- | |||
- | cp ~/' | ||
- | |||
- | ==== Settings ==== | ||
- | |||
- | sudo su ' | ||
- | |||
- | ~/' | ||
- | |||
- | < | ||
- | x</ | ||
- | |||
- | ====== Create GM Account ====== | ||
- | |||
- | * Starting the '' | ||
- | |||
- | sudo su ' | ||
- | |||
- | cd ~/' | ||
- | |||
- | account create Espionage724 x | ||
- | |||
- | account set gmlevel Espionage724 3 | ||
- | |||
- | server shutdown 1 | ||
- | |||
- | ====== Other Settings ====== | ||
- | |||
- | ===== Disable Console ===== | ||
- | |||
- | ==== Config ==== | ||
- | |||
- | * This prevents the system log from having unnecessary console spam | ||
- | * :!: To be done **after** creating the initial GM account | ||
- | * Any additional console use should come from '' | ||
- | * :!: Credentials for the remote console are the same as the GM account created above | ||
- | |||
- | sudo su ' | ||
- | |||
- | nano ~/' | ||
- | |||
- | Console.Enable = 0 | ||
- | |||
- | ==== telnet ==== | ||
- | |||
- | telnet ' | ||
- | |||
- | server shutdown 1 | ||
- | |||
- | ===== Realm Information ===== | ||
- | |||
- | * To be done after databases are initialized | ||
- | * Applies to the first realm | ||
- | * :!: If running a LAN server, change '' | ||
- | |||
- | sudo mysql | ||
- | |||
- | UPDATE `authserver`.`realmlist` SET `name` = 'RoE (WotLK)', | ||
- | |||
- | ===== Two-Factor Authentication ===== | ||
- | |||
- | * To be done after databases are initialized | ||
- | * Applies to the first account | ||
- | * :!: '' | ||
- | * Add key to Authenticator app | ||
- | * Authenticator will be prompted from the game client on each log-in | ||
- | |||
- | mysql -u root -p | ||
- | |||
- | UPDATE `authserver`.`account` SET `token_key` = ' | ||
- | |||
- | ===== SOAP ===== | ||
- | |||
- | * TODO: Re-figure out how SOAP works | ||
- | |||
- | ====== Services ====== | ||
- | |||
- | ===== authserver ===== | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=TrinityCore 3.3.5 authserver | ||
- | Wants=network-online.target | ||
- | After=network-online.target mysqld.service | ||
- | |||
- | [Service] | ||
- | Type=simple | ||
- | User=trinity | ||
- | Group=trinity | ||
- | WorkingDirectory=/ | ||
- | ExecStart='/ | ||
- | Restart=always | ||
- | RestartSec=5 | ||
- | |||
- | [Install] | ||
- | WantedBy=multi-user.target</ | ||
- | |||
- | === SELinux === | ||
- | |||
- | * :!: May have to re-run this series of commands over-time | ||
- | |||
- | sudo setenforce 0 | ||
- | |||
- | sudo systemctl start ' | ||
- | |||
- | mkdir -p ~/' | ||
- | |||
- | sudo setenforce 1 | ||
- | |||
- | nano ~/' | ||
- | |||
- | ===== worldserver ===== | ||
- | |||
- | * :!: Make sure worldserver' | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=TrinityCore 3.3.5 worldserver | ||
- | Wants=network-online.target | ||
- | After=network-online.target mysqld.service | ||
- | |||
- | [Service] | ||
- | Type=simple | ||
- | User=trinity | ||
- | Group=trinity | ||
- | WorkingDirectory=/ | ||
- | ExecStart='/ | ||
- | Restart=always | ||
- | RestartSec=5 | ||
- | |||
- | [Install] | ||
- | WantedBy=multi-user.target</ | ||
- | |||
- | === SELinux === | ||
- | |||
- | * :!: May have to re-run this series of commands over-time | ||
- | |||
- | sudo setenforce 0 | ||
- | |||
- | sudo systemctl start ' | ||
- | |||
- | mkdir -p ~/' | ||
- | |||
- | sudo setenforce 1 | ||
- | |||
- | nano ~/' | ||
- | |||
- | ===== Information ===== | ||
- | |||
- | * :!: Explanation of the update process and following services | ||
- | |||
- | - Pull-in updated sources and compile TC (1:00) | ||
- | - Stop TC auth and world services (3:00) | ||
- | - Install updated-compiled TC (3:02:30) | ||
- | - Start TC auth and world services (3:05) | ||
- | |||
- | ===== Updater ===== | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | * :!: Change '' | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Service] | ||
- | User=trinity | ||
- | Group=trinity | ||
- | Type=oneshot | ||
- | WorkingDirectory=/ | ||
- | Environment=' | ||
- | Environment=' | ||
- | ExecStartPre='/ | ||
- | ExecStartPre='/ | ||
- | ExecStartPre='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | ==== Timer ==== | ||
- | |||
- | * Every day at '' | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=TrinityCore 3.3.5 Git Updater and Compiler | ||
- | Wants=network-online.target | ||
- | After=network-online.target | ||
- | |||
- | [Timer] | ||
- | OnCalendar=*-*-* 01:00:00 | ||
- | Persistent=true | ||
- | |||
- | [Install] | ||
- | WantedBy=timers.target</ | ||
- | |||
- | ===== Stopper ===== | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Service] | ||
- | Type=oneshot | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | ==== Timer ==== | ||
- | |||
- | * Every day at '' | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=TrinityCore 3.3.5 Services Stopper | ||
- | Wants=network-online.target mysqld.service | ||
- | After=network-online.target | ||
- | |||
- | [Timer] | ||
- | OnCalendar=*-*-* 03:00:00 | ||
- | Persistent=true | ||
- | |||
- | [Install] | ||
- | WantedBy=timers.target</ | ||
- | |||
- | ===== Post-updater ===== | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Service] | ||
- | User=trinity | ||
- | Group=trinity | ||
- | Type=oneshot | ||
- | WorkingDirectory=/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | ==== Timer ==== | ||
- | |||
- | * Every day at '' | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=TrinityCore 3.3.5 Post-Updater | ||
- | Wants=network-online.target | ||
- | After=network-online.target | ||
- | |||
- | [Timer] | ||
- | OnCalendar=*-*-* 03:02:30 | ||
- | Persistent=true | ||
- | |||
- | [Install] | ||
- | WantedBy=timers.target</ | ||
- | |||
- | ===== Restarter ===== | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Service] | ||
- | Type=oneshot | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | ==== Timer ==== | ||
- | |||
- | * Every day at '' | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=TrinityCore 3.3.5 Services Restarter | ||
- | Wants=network-online.target mysqld.service | ||
- | After=network-online.target | ||
- | |||
- | [Timer] | ||
- | OnCalendar=*-*-* 03:05:00 | ||
- | Persistent=true | ||
- | |||
- | [Install] | ||
- | WantedBy=timers.target</ | ||
- | |||
- | ===== Database Backup ===== | ||
- | |||
- | * This backs up an archive to the local disk | ||
- | * :!: Everything below this line may need re-factored and isn't tested with the updated notes as of 2019/02/19 | ||
- | |||
- | ==== authserver ==== | ||
- | |||
- | === Database Auth === | ||
- | |||
- | sudo -H -u ' | ||
- | |||
- | [mysqldump] | ||
- | user=authserver | ||
- | password=x | ||
- | |||
- | === Service === | ||
- | |||
- | mkdir -p ~/' | ||
- | |||
- | [Service] | ||
- | Type=oneshot | ||
- | WorkingDirectory=/ | ||
- | ExecStartPre='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | === Timer === | ||
- | |||
- | * This happens daily | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [Unit] | ||
- | Description=TrinityCore (authserver) Database Backup | ||
- | After=mysqld.service | ||
- | | ||
- | [Timer] | ||
- | OnCalendar=*-*-* 03:40:00 | ||
- | Persistent=true | ||
- | | ||
- | [Install] | ||
- | WantedBy=timers.target | ||
- | |||
- | ==== characters ==== | ||
- | |||
- | === Database Auth === | ||
- | |||
- | sudo -H -u ' | ||
- | |||
- | [mysqldump] | ||
- | user=characters | ||
- | password=x | ||
- | |||
- | === Service === | ||
- | |||
- | mkdir -p ~/' | ||
- | |||
- | [Service] | ||
- | Type=oneshot | ||
- | WorkingDirectory=/ | ||
- | ExecStartPre='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | === Timer === | ||
- | |||
- | * This happens daily | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [Unit] | ||
- | Description=TrinityCore (characters) Database Backup | ||
- | After=mysqld.service | ||
- | | ||
- | [Timer] | ||
- | OnCalendar=*-*-* 03:41:00 | ||
- | Persistent=true | ||
- | | ||
- | [Install] | ||
- | WantedBy=timers.target | ||
- | |||
- | ====== Backup ====== | ||
- | |||
- | * Create backup archive on server and transfer to client computer | ||
- | |||
- | ===== Server ===== | ||
- | |||
- | ==== Stop Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl stop authserver worldserver | ||
- | |||
- | ==== Backup Database ==== | ||
- | |||
- | sudo mysqldump --defaults-extra-file='/ | ||
- | |||
- | sudo mysqldump --defaults-extra-file='/ | ||
- | |||
- | ==== Start Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl start authserver worldserver | ||
- | |||
- | ===== Client ===== | ||
- | |||
- | ==== Transfer Files To Client ==== | ||
- | |||
- | **** | ||
- | |||
- | scp espionage724@192.168.1.152: | ||
- | |||
- | ====== Restore ====== | ||
- | |||
- | ===== Client ===== | ||
- | |||
- | ==== Uncompress Database ==== | ||
- | |||
- | * This is only needed if restoring an **automated** database backup ((manual doesn' | ||
- | |||
- | gunzip ~/' | ||
- | |||
- | gunzip ~/' | ||
- | |||
- | ==== Transfer Files To Server ==== | ||
- | |||
- | **** | ||
- | |||
- | scp ~/' | ||
- | |||
- | ==== Remove Files ==== | ||
- | |||
- | **** | ||
- | |||
- | rm -f ~/' | ||
- | |||
- | ===== Server ===== | ||
- | |||
- | ==== Stop Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl stop authserver worldserver | ||
- | |||
- | ==== Drop Previous Database ==== | ||
- | |||
- | sudo mysql | ||
- | |||
- | DROP DATABASE authserver; | ||
- | |||
- | DROP DATABASE characters; | ||
- | |||
- | FLUSH TABLES; | ||
- | |||
- | EXIT | ||
- | |||
- | ==== Re-create Databases ==== | ||
- | |||
- | sudo mysql | ||
- | |||
- | CREATE DATABASE authserver; | ||
- | |||
- | CREATE DATABASE characters; | ||
- | |||
- | EXIT | ||
- | |||
- | ==== Restore Database ==== | ||
- | |||
- | sudo mysql ' | ||
- | |||
- | sudo mysql ' | ||
- | |||
- | ==== Reapply Permissions ==== | ||
- | |||
- | sudo mysql | ||
- | |||
- | GRANT ALL PRIVILEGES ON authserver.* to ' | ||
- | |||
- | GRANT ALL PRIVILEGES ON characters.* to ' | ||
- | |||
- | FLUSH PRIVILEGES; | ||
- | |||
- | EXIT | ||
- | |||
- | ==== Start Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl start authserver worldserver | ||
- | |||
- | ==== Remove Backups ==== | ||
- | |||
- | * Verify that TrinityCore works before running | ||
- | |||
- | rm ~/' | ||
/var/www/wiki/data/attic/servers/games/cmangos_classic.1687900827.txt.gz · Last modified: 2023/06/27 17:20 by Sean Rhone