1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
This tutorial explains how to compile and install AzerothCore in your host system.
Alternatively, it is also possible to [use AzerothCore with Docker](Install-with-Docker.md).
For macOS users: the build on mac is currently broken (see [this issue](https://github.com/azerothcore/azerothcore-wotlk/issues/122)), but you can still use AzerothCore on macOS with Docker.
## 1) Installing the requirements
Make sure your system fits with the [Requirements](Requirements.md).
## 2) Getting the source files
Choose one of the following method:
```
1) Clone only the master branch + full history (smaller size - recommended):
git clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch azerothcore
2) Clone only the master branch + no previous history (smallest size):
git clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch azerothcore --depth 1
3) Clone all branches and all history:
git clone https://github.com/azerothcore/azerothcore-wotlk.git azerothcore
```
Note: If you want to get the full history back, use `git fetch --unshallow` (if you chose option 2).
## 3) Compiling
### Compiling on GNU/Linux or Mac OS X
```
cd azerothcore
mkdir build
cd build
```
Before running the CMake command, replace `$HOME/azeroth-server/` with the path of the server installation (where you want to place the compiled binaries).
**CMAKE OPTIONS**
Check the options here if you know what you're doing: [CMake options](CMake-options.md)
**CMake on Linux:**
At this point, you must be in your "build/" directory.
**Note**: in the follows command the variable `$HOME` is the path of the **current user**, so if you are logged as root, $HOME will be "/root".
```
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azeroth-server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1
```
Then, replacing `4` with the number of threads that you want to execute, type:
```
make -j 4
make install
```
**CMake on Mac OS X:**
**Note**: in the follows command the variable `$HOME` is the path of the **current user**, so if you are logged as root, $HOME will be "/root".
```
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azeroth-server/ -DTOOLS=0 -DSCRIPTS=1 -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient_r.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl/lib/libcrypto.dylib
```
Then, replacing `4` with the number of threads that you want to execute, type:
```
make -j 4
make install
```
### Compiling on Windows
Open CMake , press `Browse Source...` button and select the folder that you cloned earlier then press `Browse Build...` and select a folder where the CMake will generate the build files. Press the `Configure` button.
CMake will ask you to select what compiler to use. For example you'll want to select `Visual Studio 14 2015 Win64` to compile x64 binaries using Visual Studio 2015. Do not change the `Use default native compilers` option. Press `Finish` and wait until CMake is done checking for requires files. (remember to change "optional platform for generator" to x64 for 64bit version)
Change `CMAKE_INSTALL_PREFIX` to the location where you will run your server from.
Press `Configure` once again and then press `Generate`. If no error occurred you can close CMake.
Go to the location where the build files have been generated and open AzerothCore.sln
_Note: If MySQL is not found by CMake it is required to set MYSQL_INCLUDE_DIR = C:/mysql_libs/include and MYSQL_LIBRARY= C:/mysql_libs/lib_XX/libmysql.lib._
_XX depends if you are compiling in 32 or 64 bits mode. ( See [Windows Requirements article](Requirements.md#windows) )_
Press `BUILD` then select `Build solution` or press F6.
Wait until the Build has been finished (It should take between 10-40 minutes depending on your hardware).
You will find your freshly compiled binaries in the Build\bin\Release or Build\bin\Debug folder. These are all used to run your server at the end of this instruction.
You will need the following files in order for the core to function properly:
```
libeay32.dll
libmySQL.dll
ssleay32.dll
ace.dll
worldserver.conf.dist
worldserver.exe
authserver.conf.dist
authserver.exe
```
Copy `libeay32.dll` and `ssleay32.dll` from OpenSSL install folder into `CMAKE_INSTALL_PREFIX`.
Copy `libmysql.dll` from your MYSQL_LIBRARY path into `CMAKE_INSTALL_PREFIX`
**Note:** Do not use ARM architecture as azerothcore requires SSE2 and ARM doesn't support it.
## 4) Setting the configuration files
Inside the directory where you installed the binaries (e.g. `/home/youruser/azeroth-server/`), open the directory where configuration files has been installed ( `etc/` on linux ) , then:
- copy the file `authserver.conf.dist` and rename it to `authserver.conf` ( DO NOT REMOVE THE .dist FILE )
- copy the file `worldserver.conf.dist` and rename it to `worldserver.conf` ( DO NOT REMOVE THE .dist FILE )
_Please Read [How to edit .conf files](how-to-work-with-conf-files.md) article to understand how configuration files work, and why you need the .dist file too_
Open both `authserver.conf` and `worldserver.conf` files and go to the `MYSQL SETTINGS` section, then set the variables:
```
LoginDatabaseInfo = "127.0.0.1;3306;root;your_password;auth"
WorldDatabaseInfo = "127.0.0.1;3306;root;your_password;world"
CharacterDatabaseInfo = "127.0.0.1;3306;root;your_password;characters"
```
replacing `your_password` with the password of your MySQL server root user
(the `authserver.conf` has the `LoginDatabaseInfo` variable only).
In the worldserver.conf file, also set:
`DataDir = "/home/youruser/azeroth-server/data"`
replacing `/home/youruser/azeroth-server` with the path where you installed the binaries.
## 5) Download the data files
Go to the directory of your azeroth server (e.g. `/home/youruser/azeroth-server`) and create a new directory named `data`
Two options to choose from:
#### A) [[Extract Client Data]] from your own WOW client with AzerothCore extractors
#### B) (Easier) Download directly from mega with the links below:
- [From 03/01/19 to now](https://mega.nz/#F!Am4DBKCR!o9Qj_xFLfsg4sczqg0xq2A) (choose this version if you are installing AzerothCore for the first time)
- [From 07/18/18 to 03/01/19](https://mega.nz/#!utg3hKJL!TtSzcWxVkvxF4HJvor8LFWhrBwwpH2pHpI-xHGr-HZo) (before commit [59d4e1d3a806a4f2f48f535be366bde1b24d737e](https://github.com/azerothcore/azerothcore-wotlk/commit/59d4e1d3a806a4f2f48f535be366bde1b24d737e))
- For older versions, check out this page's history.
Extract all the archives and place the extracted `dbc`, `maps`, `mmaps`, `vmaps` directories inside the data directory.
## 6) Setting up the database
### Base DB setup
Follow these instructions: [Database Setup](Database-Setup).
**Note**: by default, database names are configured to be named:
- `acore_characters`
- `acore_auth`
- `acore_world`
if, for some reasons, you decide to name them differently, remember to edit your `authserver.conf` and `worldserver.conf` accordingly.
### Configure your auth.realmlist table
In the `auth` database, you must fill the `realmlist` table with your connection info.
It must correspond with your configuration file (for realmid, flag and realmzone).
Address: 127.0.0.1 OR <Your LOCAL NETWORK ip> OR <Your PUBLIC NETWORK ip>
Port : worldserver port
## 7) Starting the servers
### GNU/Linux and Mac OS X
Open 2 terminal windows (or terminal tabs) and move to the `bin` directory of your azeroth server (for example `/home/youruser/azeroth-server/bin`),
then in one window/tab type:
`./authserver`
in the other one:
`./worldserver`
### Windows
Run `worldserver.exe` and `authserver.exe` from `CMAKE_INSTALL_PREFIX`.
## 8) Connecting to the server
Edit your `realmlist.wtf` and add the IP you set in the realmlist table (and the port if needed). Then you can connect with a newly made account or the test accounts (`test1` to `test10`, with password `a`).
You can change all the passwords at once by pasting this into the worldserver console:
```
.account set password test1 new_pass new_pass
.account set password test2 new_pass new_pass
.account set password test3 new_pass new_pass
.account set password test4 new_pass new_pass
.account set password test5 new_pass new_pass
.account set password test6 new_pass new_pass
.account set password test7 new_pass new_pass
.account set password test8 new_pass new_pass
.account set password test9 new_pass new_pass
.account set password test10 new_pass new_pass
```
|