Server environment Ubuntu 18.04
The first step is to download the Go installer from your computer's command line program.
Go to the official Go Downloads page and copy the URL for the installer under version go 1.13.3
Open up your computer's command line program, and make sure that you are in the home (~) directory:
cd ~
Use curl to retrieve the tarball URL that you copied from the official Go downloads page:
curl -O https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz
Next, extract the downloaded archive and install it in a desired location on your system. If you're not sure where to install it, best practices suggest keeping it under your local user directory (e.g., /usr/local
)
sudo tar -xzf go1.13.3.linux-amd64.tar.gz -C /usr/local
Although /usr/local/go is the officially recommended location, some users may prefer or require different paths.
Prior to Go 1.8, it was required to set a local environment variable called $GOPATH
which instructed the compiler on where to find imported third-party source code, as well as any local source code you have saved. While it is no longer explicitly required, it is still considered a good practice as many third-party tools still depend on this variable being set.
You can set your $GOPATH
by adding the global variables to your ~/.profile. You may want to add this into .zshrc or .bashrc file as per your shell configuration.
First, open ~/.profile
or ~/.bashrc
with nano or your preferred text editor:
nano ~/.profile
Now, you'll need to setup the Go language environment variables for your project. Normally you need to set three environment variables: GOROOT
, GOPATH
, and PATH
.
GOROOT
is the location where Go package is installed on your system.
GOPATH
is the location of your work directory. For example, my project directory is ~/Projects/Proj1 .
Now you can export the setting into the ~/.profile
or ~/.bashrc
# export GOPATHecho "export GOPATH=$HOME/go" >> ~/.bashrc# set PATH so it includes user's private bin directoriesecho "export PATH=\"$PATH:$GOPATH/bin:/usr/local/go/bin\"" >> ~/.bashrc
To update your shell, issue the following command to load the global variables:
. ~/.bashrc
You can verify your $PATH is updated by using the echo command and inspecting the output:
echo $PATH
Check your Go version:
go version
And finally, verify all configured environment variables are set, using following command:
go env
The latest chain node binary and CLI tool binary can be downloaded from:
certikd
is the daemon for running a full-node of the certik application.
certikcli
is the command-line interface that interacts with the certik full-node.