Skip to content

Commit

Permalink
Update debian12-install-guide.md (#1005)
Browse files Browse the repository at this point in the history
Removed MariaDB. Updated to MySQL 8.4
  • Loading branch information
aradep authored Oct 2, 2024
1 parent 6b7d78e commit 9d2ada6
Showing 1 changed file with 58 additions and 56 deletions.
114 changes: 58 additions & 56 deletions docs/debian12-install-guide.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
{% include warning.html content="This guide is out-dated as it refers to MariaDB, which is no longer supported." %}
# AzerothCore Debian 12 Install Guide

# AzerothCore Debian 12 Quick Install Guide
This is a quickstart guide for installing AzerothCore to a Debian 12 server, securing it, and enabling one-command maintenance from your Windows PC.

This is a streamlined guide for installing AzerothCore to a Debian 12 server, securing it, and enabling one-command maintenance from your Windows PC.
## Table of Contents

- [AzerothCore Debian 12 Quick Install Guide](#azerothcore-debian-12-quick-install-guide)
- [Table of Contents](#table-of-contents)
- [Requirements](#requirements)
- [PuTTY](#putty)
- [FileZilla](#filezilla)
- [HeidiSQL](#heidisql)
- [Debian 12](#debian-12)
- [Debian Setup](#debian-setup)
- [First Login](#first-login)
- [Change Default Password](#change-default-password)
- [Change Default SSH Port](#change-default-ssh-port)
- [Setup Firewall](#setup-firewall)
- [Get MySQL](#get-mysql)
- [Get Dependencies](#get-dependencies)
- [Install SQL Database](#install-sql-database)
- [SSH Setup](#ssh-setup)
- [Key Generation](#key-generation)
- [Debian Public Key](#debian-public-key)
- [Windows Private Key](#windows-private-key)
- [Key-based Login Setup](#key-based-login-setup)
- [PuTTY](#putty-1)
- [FileZilla](#filezilla-1)
- [HeidiSQL](#heidisql-1)
- [Disable Password Logins](#disable-password-logins)
- [AzerothCore Installation](#azerothcore-installation)
- [Clone Repository](#clone-repository)
Expand All @@ -38,42 +25,32 @@ This is a streamlined guide for installing AzerothCore to a Debian 12 server, se
- [Launch Server](#launch-server)
- [Create GM account](#create-gm-account)
- [Maintenance](#maintenance)
- [Create Alias Command](#create-alias-command)
- [Update AzerothCore](#update-azerothcore)
- [Finish!](#finish)
- [Common Problems](#common-problems)
- [Auth/Worldserver wont even start.](#authworldserver-wont-even-start)
- [Successful login but cant enter the realm.](#successful-login-but-cant-enter-the-realm)
- [Good things to know that this guide does not cover.](#good-things-to-know-that-this-guide-does-not-cover)
- [Other Resources](#other-resources)

## Requirements

##### [PuTTY](https://www.putty.org/)
- A Windows program for sending commands to the server.
##### [FileZilla](https://filezilla-project.org/download.php)
- A Windows program for transferring files to/from the server.
##### [HeidiSQL](https://www.heidisql.com/)
- A Windows program for connecting to the servers SQL database.
##### [Debian 12](https://www.ovhcloud.com/en-ca/vps/)
- A server with Debian 12 installed. (ex: 4gb/4core VPS from OVH)
### Optional
##### [FileZilla](https://filezilla-project.org/download.php)
- A Windows program for transferring files to/from the server. Used during [SSH Setup](#ssh-setup) to copy the generated key file to your PC.
##### [HeidiSQL](https://www.heidisql.com/)
- A Windows program for connecting to the servers SQL database. Not used in this guide.

---
## Debian Setup
### First Login

- Use **PuTTY** to connect to your Debian server using the IP address and login credentials supplied by the hosting provider.
- Use **PuTTY** to connect to your Debian server using the IP address and login credentials supplied by the hosting provider. (If you are logging in as root, first create a new user with sudo privileges and switch to it.)
- Copy the following code blocks and paste them into the PuTTY terminal with right click, then hit enter.
### Change Default Password
```bash
passwd
```
### Change Default SSH Port
```bash
sudo sed -i 's/^#Port 22\+$/Port 55022/' /etc/ssh/sshd_config
sudo systemctl restart sshd
```
- Remember to use 55022 as the SSH port for subsequent connections.
- Remember to use 55022 as the SSH port from now on.
### Setup Firewall
```bash
sudo apt install ufw
Expand All @@ -84,16 +61,29 @@ sudo ufw allow 3724
sudo ufw allow 8085
sudo ufw enable
```
### Get MySQL
```bash
mkdir -p ~/mysqlpackages && cd ~/mysqlpackages
wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.32-1_all.deb
```
- MySQL Server & Cluster: mysql-8.4
- MySQL Tools & Connectors: Enabled
### Get Dependencies
```bash
sudo apt update && sudo apt full-upgrade -y
sudo apt install git cmake make gcc g++ clang libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev mariadb-server mariadb-client libmariadb-dev libmariadb-dev-compat build-essential p7zip-full screen fail2ban -y
sudo apt update && sudo apt install git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev build-essential p7zip-full screen fail2ban -y
```
### Install SQL Database
```bash
sudo mysql_secure_installation
```
- **-/N/Y/Y/Y/Y/Y**
- Validate password component: N
- Change the password for root: Y
- Enter a password for the SQL root user.
- Remove anonymous users: Y
- Disallow root login remotely: Y
- Remove test database: Y
- Reload privilege tables: Y
```bash
sudo mysql -u root -p
```
Expand All @@ -108,6 +98,7 @@ exit
- Change **SQLPASSWORD** to something more secure.
---
## SSH Setup
This is an optional step that involves creating a key file and disabling password-based SSH logins to increase security of the Debian server and SQL database.

### Key Generation
#### Debian Public Key
Expand All @@ -120,16 +111,30 @@ cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
- Copy the `id_ed25519` file to your PC and load it into **puttygen.exe** (located in the PuTTY folder)
- Generate a private key `.ppk` file. Store this file somewhere safe and make a backup.
### Key-based Login Setup
#### PuTTY

<details>
<summary>PuTTY</summary>

![PuTTY1](https://github.com/azerothcore/wiki/assets/61268368/6210d43d-a7c4-4444-b896-4f23a2ee415f)
![PuTTY2](https://github.com/azerothcore/wiki/assets/61268368/e39e5a4f-f93f-4a69-9d9c-785bd98afdbd)
</details>

<details>
<summary>FileZilla</summary>

#### FileZilla
![FileZilla](https://github.com/azerothcore/wiki/assets/61268368/d45e952a-4f3b-4c38-9cdb-b72f5bc76651)
#### HeidiSQL
![HeidiSQL1](https://github.com/azerothcore/wiki/assets/61268368/9d693ba8-bd49-448c-92b4-2206b7e04e41)
</details>

<details>
<summary>HeidiSQL</summary>

![HeidiSQL12](https://github.com/user-attachments/assets/b23a37d2-774e-4a47-b5b5-2bb2ba73c690)
![HeidiSQL2](https://github.com/azerothcore/wiki/assets/61268368/4043857a-2d1e-4c5b-bb61-2d76ed8a5514)
</details>

### Disable Password Logins
- **After confirming that key-based login works**, disable password logins to enhance SSH security.
- **After confirming that key-based login works**, disable password logins.
```bash
sudo sed -i -E 's/#?PasswordAuthentication yes/PasswordAuthentication no/' ~/etc/ssh/sshd_config
sudo rm /etc/ssh/sshd_config.d/*
Expand Down Expand Up @@ -170,15 +175,6 @@ sudo sed -i -E 's/= "127.0.0.1;3306;acore;acore;/= "127.0.0.1;3306;acore;SQLPASS
```
- Change **USERNAME** to your Debian user.
- Change **SQLPASSWORD** to the password for the acore database user.
### Set Realm IP
```bash
sudo mysql -u acore -p
```
- Enter the password for the acore database user.
```sql
UPDATE acore_auth.realmlist SET address = '0.0.0.0' WHERE id = 1;
```
- Change **0.0.0.0** to the public IP address of your Debian12 server.
### Launch Server
```bash
screen -AmdS auth ~/server/bin/authserver
Expand All @@ -191,10 +187,21 @@ screen -r world
account create USERNAME PASSWORD
account set gmlevel USERNAME 3 -1
```
- Detach from the worldserver screen with Ctrl+A -> Ctrl+D

- **To exit screen:** Ctrl+A -> Ctrl+D
- **To kill process:** Ctrl+C
### Set Realm IP
```bash
sudo mysql -u acore -p
```
- Enter the password for the acore database user.
```sql
UPDATE acore_auth.realmlist SET address = '0.0.0.0' WHERE id = 1;
exit
```
- Change **0.0.0.0** to the public IP address of your Debian12 server.
## Finish!

- You should now be able to log into AzerothCore by setting your realmlist to the public IP address of the Debian12 server. ex: `set realmlist 0.0.0.0`
---
## Maintenance
### Create Alias Command
Expand All @@ -218,11 +225,6 @@ source ~/.bashrc
```
acoreupdate
```

## Finish!

- You should now be able to connect to the AzerothCore server by setting your realmlist to the public IP address of the Debian12 server. ex: `set realmlist 0.0.0.0`

---
## Common Problems

Expand Down

0 comments on commit 9d2ada6

Please sign in to comment.