Part 2 - Software Installation
1. Install Dependencies
Now let's install the Pocket CLI.
At this point you should be logged in via SSH as the pocket
user that we set up in a previous step. Before we install the Pocket software, we need to update the existing system packages and add a few dependencies:
Updating system packages
Update the repository index with the following command:
Update the distribution with the following command:
After the update completes, we're ready to install the dependencies.
Installing dependencies
There are a handful of dependencies but installing them won't take long. Some might already be installed so if one of the dependencies exists, you can just move on to the next one.
git
build tools
curl
file
nginx
certbot
python3-certbot-nginx
jq
2. Install Go
After installing the dependencies, there is one more dependency we'll need to add, and that's Go. Go (sometimes known as "Golang") is the programming language that the Pocket software was written in.
We could install Go using apt
, but we want to get the latest stable version which probably isn't available by default in the apt
repository. So, we'll use the steps below to install Go.
Make sure you're in the pocket home directory.
Find the latest version of Go from https://golang.org/dl/ then download it with the following command. (Make sure to change the link below to point to the correct version of Go.)
Extract the archive:
Set permissions on the extracted files:
Add Go to the
PATH
:Set the
GOPATH
andGOBIN
environment variables:Reload your
.profile
:Verify the installation by running
go version
and ensure it outputs the correct version number. If it doesn't work, try logging out and logging back in.Verify the
GOPATH
andGOBIN
variables are set correctly by runninggo env
.
3. Install Pocket
After verifying you have the latest stable version of Go, we're ready to install the Pocket software.
We'll be downloading Pocket Core from GitHub and then compiling it with Go to get it fully installed.
To download and install Pocket Core, do the following:
Create a project directory:
Change to the project directory:
Clone the Pocket Core repository:
Change to the code directory:
Checkout the latest version. You can find the latest tag by going to the Pocket Core tags on GitHub.
Note: You may see a warning about being in a "detached HEAD" state. This is normal.
Build project code:
Test that the build succeeded by running
pocket version
.
That’s it for the software installation. Now let’s move on to the Pocket core configuration.
Last updated