Table of Contents

Storj (on Debian Jessie)

System Setup

We'll generally refer to the Storj documentation to install the required components.

Modify Sources Lists

In the coming processes, we'll need to modify the system kernel and upgrade specific packages for reuired versions that are not available from the Debian Jessie main repositories. We'll mix and match between stable, backports and testing repositories, So let's first update our sources:

Modify sources and their priorities

> echo deb http://ftp.debian.org/debian jessie-backports main contrib >> /etc/apt/sources.list.d/backports.list
> echo deb http://ftp.debian.org/debian stretch main >> /etc/apt/sources.list.d/stretch.list
> nano /etc/apt/preferences
Package: *
Pin: release a=jessie
Pin-Priority: 700

Package: *
Pin: release a=jessie-backports
Pin-Priority: 650

Package: *
Pin: release a=stretch
Pin-Priority: 600

Package: *
Pin: release a=unstable
Pin-Priority: 100

Now we can update our apt listing:

> apt-get update

Upgrade the Kernel

As we'll need libc6 2.22 to run the pre-compiled storj binary, we first need to update to to at least kernel 3.2 (we'll see that our option here will be 4.9.0) while the default Debian Jessie kernel is 3.16. As a final step, a reboot will be required to load the new kernel:

Upgrade Debian Kernel

> apt-cache search linux-image
...
linux-image-4.9.0-0.bpo.3-amd64 - Linux 4.9 for 64-bit PCs
...
> apt-get install -t jessie-backports linux-image-amd64
> reboot

Install Required Dependencies

libuv1-dev is only available in the Jessie Backports, so we'll need to select the jessie-backports source when installing. Also the pre-compiled binary (libstorj-1.0.0-linux64) has seemingly been compiled with GLIBC-2.22 requirement. The standard libc6 package available in Debian Jessie being 2.19*, we'll need to fetch this package from the stretch (testing) repos which carries libc6 version 2.24*:

Update/Upgrade libraries

> apt-get install -t jessie libcurl4-gnutls-dev nettle-dev libjson-c-dev
> apt-get install libuv1-dev/jessie-backports
> apt-get install -t stretch libc6
    Restart services -> YES

Install the ''libstorj'' Library

Latest releases are available from this GitHub page:

> wget https://github.com/Storj/libstorj/releases/download/v1.0.0/libstorj-1.0.0-linux64.tar.gz
> tar xvf libstorj-1.0.0-linux64.tar.gz -C /opt/
> chown -R root:root /opt/libstorj-1.0.0

Test the Library

To use the library, enter the bin/ repository of the libstorj installation:

> cd /opt/libstorj-1.0.0/bin/
> ./storj --help

To be able to simply type the storj command in future usage of the library, we'll add /opt/libstorj-1.0.0/bin/ to our user's default PATH:

> echo PATH=$PATH:/opt/libstorj-1.0.0/bin >> ~/.bashrc
> source ~/.bashrc

''libstorj'' Usages

From this point on it's recommeded to refer to the official Storj documentation to start using the storj commands…