This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
forked from steemit/steem
-
Notifications
You must be signed in to change notification settings - Fork 36
Build instruction
Andrew Falaleev edited this page Mar 30, 2018
·
34 revisions
We ship a Dockerfile in project to simplify the process of building and running of golosd
.
If you want to build golosd
without docker your OS should be Ubuntu 16.04.
There is no a simple way to build golosd
under any other version of Linux.
Building of docker container can be done on any OS. And it is a quite simple:
git clone https://github.com/GolosChain/golos.git
cd golos
docker build -t goloschain/golos -f Dockerfile .
docker run -d \
-p 2001:2001 -p 8090:8090 -p 8091:8091 \
--name golos-default \
goloschain/golos
docker logs --tail 10 -f golos-default
The following instruction is actual only for Ununtu 16.04.
# Install required packages:
sudo apt-get install -y \
autoconf \
automake \
autotools-dev \
bsdmainutils \
build-essential \
cmake \
doxygen \
git \
ccache\
libboost-all-dev \
libreadline-dev \
libssl-dev \
libtool \
ncurses-dev \
pbzip2 \
pkg-config \
python3 \
python3-dev \
python3-pip \
runit
sudo pip3 install gcovr
# Clone source code from github:
git clone https://github.com/GolosChain/golos.git
cd golos
git submodule update --init --recursive -f
# Configure the project:
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_GOLOS_TESTNET=FALSE \
-DBUILD_SHARED_LIBRARIES=FALSE \
-DLOW_MEMORY_NODE=FALSE \
-DCHAINBASE_CHECK_LOCKING=FALSE \
-DCLEAR_VOTES=FALSE \
..
# Build project and install the daemon to /usr/local/:
make -j $(nproc)
sudo make install
# Ok. Now, we should configure environment for the golosd.
# Create user for daemon:
sudo useradd -s /bin/bash -m -d /var/lib/golosd golosd
# Copy the genesis initial file for the blockchain:
sudo cp ../share/golosd/snapshot5392323.json /var/lib/golosd/
# Copy config files to the /etc directory:
sudo mkdir -p /etc/golosd
sudo cp ../share/golosd/seednodes /etc/golosd/
sudo cp ../share/golosd/config/config.ini /etc/golosd/
sudo chown golosd:golosd -R /etc/golosd/
# Create a service file for the daemon:
sudo mkdir -p /etc/service/golosd
sudo cp ../share/golosd/golosd.sh /etc/service/golosd/run
sudo chmod +x /etc/service/golosd/run
# The golosd can be started:
sudo runsv /etc/service/golosd