felipefaraggi

2 min read - Posted 26 Feb 20

Installing Besu binary on Linux

Ever gotten a "besu command not found" on your terminal? Well, read on...

Although there are many ways to install software on a Linux machine, an accepted startard practice is to install on your Linux user's home/bin folder. The following will help you install Hyperledger Besu on Ubuntu, and can be tweaked to many other distributions.

The Java JDK is a requirement for running Besu. Make sure its already installed and higher than version 11 by typing java --version. If it isn't installed, follow these install instructions or type sudo apt install default-jdk into the terminal.

  1. Download the latest binary from a trusted website (ie. the PegaSys website).

  2. If it doesn't exist, make the home bin folder.

cd ~
mkdir bin
  1. Move the binary to the bin folder. Remember to replace <binary-filename> with the name of the file you've downloaded from step 1.
cd ~
cd Downloads
mv <binary-filename> ~/bin
  1. Untar/unzip the downloaded binary. Depending on which file type you've downloaded, choose the extraction type.

If not present in your system, install unzip with sudo apt-get install unzip.

Untar:

cd ~
cd bin
tar xf <binary-filename>.tar.gz

Unzip:

cd ~
cd bin
unzip <binary-filename>.zip
  1. Rename the folder to besu.

You may now remove the original tar/zip file.

mv <besu-version>/ besu

Your bin folder should look like this now:

~/tmp/bin
$ tree -L 2
.
└── besu
    ├── bin
    ├── lib
    ├── LICENSE
    └── license-dependency.html
  1. Add Besu to your PATH environment variable. Adding a binary to your PATH allows you to run the executable from any folder on your machine, without having to point to it directly at each call.

Using your text editor of choice, add the following line to your .bashrc (or .zshrc, etc) file.

PATH=$PATH:~/bin/besu/bin
  1. Restart your terminal.

You should now be able to run Besu from any folder, open a terminal window and type besu -h and you will get the besu help output in the terminal.

Get more information on Besu here:

Docs
Code
Binaries
Wiki
Jira
Web

Created with Sketch.Content is"CC-BY-SA 4.0" licensed
Article Author

Felipe Faraggi

Developer Evangelist

6

0

1

0 Comments
Related Articles
Updating the Besu client binary on Linux

If youve read the previous article on how to add the Besu Binary to your PATH, then updating the client is very easy. Download the new version of the Besu binar

Using Besu, the Java Ethereum Client with Linux/MacOS

Toolbelt: Besu included! Original photo by Jesse Orrico Update: Pantheon is now Hyperledger Besu. For more information, see here. This is the Linux/MacOS version of an article on installing Besu, the Java client for Ethereum: Linux Windows Having some powerful tools in your toolbelt is essential for a Java developer, and one of the crucial tools for an Ethereum blockchain developer is the network client. This is the piece of software that communicates data to and from the blockchain. Among other