-
Notifications
You must be signed in to change notification settings - Fork 14
Installation on Linux Debian
Sephus edited this page Sep 5, 2023
·
1 revision
This guide is for the development and installation of Horizon on Linux / Debian operating systems.
- Upon starting a Debian distribution, run the following commands one by one onto the com
apt-get install -y build-essentials cmake libreadline-dev liblua5.4-dev liblua5.4 zlib1g-dev gcc libboost-all-dev libssl-dev
- Install MySQL by first installing its repository for apt to use. -
wget https://dev.mysql.com/get/mysql-apt-config_0.8.25-1_all.deb
dpkg -j mysql-apt-config_0.8.25-1_all.deb
- Configure MYSQL as shown in the following image
apt-get update
apt-get install libmysqlclient-dev
apt-get install libmysqlcppconn-dev
apt-get install mysql-community-server
-
Configure your MYSQL Password and select "Secure Authentication (Recommended)" when prompted.
-
Setup sol2 package library for the server -
apt-get install git
git clone https://www.github.com/ThePhD/sol2
cmake -B build -S sol2
cmake --build build --target install
- Now lets clone and build horizon -
git clone https://github.com/horizonxyz/horizon
cmake -B horizon/build -S horizon
cmake --build horizon/build --target install
- Hopefully you should see this line at the end of the compilation -
[100%] Built target zone That's it! you've successfully built horizon.
- Now just copy the folders -
config
db
scripts
into the bin directory where the applications are installed.
-
Rename the configuration files by removing .dist at the end.
-
Don't forget to configure your servers. and import the sql-file into your database.
CREATE DATABASE horizon;
CREATE USER 'horizon'@localhost IDENTIFIED BY 'horizon';
GRANT ALL ON horizon.* TO 'horizon'@localhost;
FLUSH PRIVILEGES;
followed by the command on shell -
mysql -u horizon -phorizon horizon < sql-files/horizon.sql
- And you can start the servers using the following commands
./auth --with-config="config/auth-server.lua"
./char --with-config="config/char-server.lua"
./zone --with-config="config/zone-server.lua"