Skip to content

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.

  1. 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

  1. 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
  1. 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
  1. Configure your MYSQL Password and select "Secure Authentication (Recommended)" when prompted.

  2. 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
  1. 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
  1. Hopefully you should see this line at the end of the compilation - 

[100%] Built target zone That's it! you've successfully built horizon.

  1. Now just copy the folders - 
config
db
scripts

into the bin directory where the applications are installed.

  1. Rename the configuration files by removing .dist at the end.

  2. 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
  1. 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"

None