# Required Packages

{% hint style="success" %}
To run a VagaChain validator node, one must have the latest stable version of Golang and Rust installed on their Linux distro.
{% endhint %}

## Prerequisites

* CentOS 7/8, Ubuntu 18.04 LTS (or later) or Debian 11 linux server instance
* `sudo` or `root` access to run privileged commands
* Latest available Golang package
* Rust >= v1.66
* Nginx web server
* \+ other essential Linux dependencies such as curl, wget, gcc, git, snap and make.

### First step - Update OS and Install Essential Dependencies

First, ensure that your system is up-to-date and packages are to their latest versions. This is achieved using the command below:

{% tabs %}
{% tab title="Debian / Ubuntu" %}
```bash
# Update Linux
sudo apt update
sudo apt -y upgrade
```
{% endtab %}

{% tab title="CentoOS / Fedora / Red Hat" %}
```bash
# Update Linux
sudo yum makecache
sudo yum -y update
```
{% endtab %}
{% endtabs %}

This next command will install the essential dependencies:

{% tabs %}
{% tab title="Debian / Ubuntu" %}
```bash
# Install essential dependencies
sudo apt -y install make pkg-config build-essential libssl-dev gcc git jq chrony wget curl unzip glibc-source
sudo apt install snapd
```
{% endtab %}

{% tab title="CentoOS / Fedora / Red Hat" %}
```bash
# Install essential dependencies
sudo yum -y install make pkgconfig openssl-devel gcc git gcc-c++ jq chrony wget curl unzip epel-release glibc
sudo yum -y install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
#Log out and back in again or restart your system to ensure snap’s paths are updated correctly.
```
{% endtab %}
{% endtabs %}

## <mark style="color:red;">Golang</mark>

### Introduction

Go or Golang, as it is called, is an open-source programming language developed by Google. Thanks to its ease of use, versatility and reliability, Golang has become one of the most popular programming languages in the open source community. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction.

### Golang Install

This guide offers a systematic demonstration of how to install the latest stable release of Golang on 64-bit Linux operating systems.

#### Install Procedure

Type the following `snap` command to install the latest Golang:

```bash
# Install Go
sudo snap install go --classic
# Sample Output:
# go 1.19.4 from Michael Hudson-Doyle (mwhudson) installed

sudo mkdir -p /snap/bin/gobin
```

Then proceed and adjust your PATH variables. This will tell your system where to find and execute the Go executable binaries.

<pre class="language-bash"><code class="lang-bash"># Set PATH
echo 'export GOPATH="$HOME/go"' >> ~/.profile
echo 'export PATH="$GOPATH/bin:$PATH"' >> ~/.profile
<strong>source ~/.profile
</strong></code></pre>

#### Verify Install

To verify that Go is properly installed run this command:

```bash
go version
# Sample Output
# go version go1.19.4 linux/amd64
```

Done!

## <mark style="color:red;">Rust</mark>

### Introduction

Rust is a high performance, statically-typed multi-paradigm programming language designed for performance and safety, especially safe concurrency and memory management. Compared to C++ of similar syntax, rust solves problems that C/C++ developers have been struggling with for a long time: memory errors and concurrent programming. Rust is one of the most popular programming languages for developers due to its open-source, fast, reliable, and high-performance features.

### Rust Install

For additional information, please refer to the [official Rust documentation](https://doc.rust-lang.org/book/ch01-01-installation.html).

Run the following `curl` command:

```bash
# Install Rust
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh
```

The following option list will be presented:

```
Current installation options:
   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
```

Select option #1 and proceed.

#### Verify Install

To verify that Rust is properly installed run the following command:

```bash
rustc --version

#sample output
rustc 1.66.0
```

Done!
