Building Tezos on Ubuntu & Debian— Fast Build

Shaun Belcher
2 min readJul 16, 2018

--

Quick shell script to assist in bootstrapping Tezos on Ubuntu server nodes for testing and development.

Tested on Ubuntu Server 18.04, 17.10 & 16.04. Community user assisted in confirming Ubuntu Desktop 18.04 by installing the curl package first which is included in the current build.

Update 10/26 —Updated URL to prior commit on Opam 2.0.0 install script.

Update 9/18 — Updated script naming to mainnet build.

Update 7/23:

  • Debian 9.5 build works with the installation of sudo as a prerequisite.

Update 8/14:

  • Updated script to utilize the Opam generic installation script in place of direct curl download of the RC3 candidate. This should always provide the latest version of Opam for your OS.
  • Added additional packages to prerequisites missing on VPS build: libgmp3-dev libev-libevent-dev
  • Added section on pulling the latest GitLab build in your environment.

Missing Sudo?

Different Linux builds will include different packages included. You may find while setting up a Debian build this is missing and require installation.

apt-get install sudo

Automated Shell Script Build

Create a new administrator account on the node and login:

#install packages updates & upgrades
sudo apt-get update
sudo apt-get upgrade -y
#create new administrator account
adduser tezos
adduser tezos sudo
su - tezos

Run the script to install build-essentials on the node:

sh <(curl -sL https://raw.githubusercontent.com/bitc0m/tezos/master/mainnet-fastbuild.sh)

Check the node is syncing properly:

cd ./tezos
./tezos-client bootstrapped #shows the current

You can view the tezos-node process output by tailing nohup.out:

tail -f nohup.out #view./tezos-node process output

The mainnet fastbuild shell script also injects a mainnet alias into your tezos administrator ~/.profile. Enter source ~/.profile to reload it before usage. Enter mainnet to represent the full command ./tezos-client --addr 127.0.0.1 --port 8732 as shown in the profile entry below:

alias mainnet='./tezos-client --addr 127.0.0.1 --port 8732'

Updating to the Latest Build

Stop the running processes for your node, baker, endorser and accuser.

cd ./tezos
eval $(opam env)
git pull
make

If you found this helpful please consider donating to fund future articles:
tz1aDTfsXMh1UGGy7FYL86AqRRgrDdFS7a8q

--

--