Install a development environment quickly
Nodejs environment
NVM (Node Version Manager) is a POSIX-compliant bash script to manage multiple active node.js versions. To install it run the following command.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Now it is possible to easily install and switch between different node versions.
nvm install 16
nvm use 16
node -v
Python environment
Install the python build dependencies:
sudo apt-get update; sudo apt-get install make build-essential \
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev \
libxmlsec1-dev libffi-dev liblzma-dev
Install pyenv automatically:
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Configure bashrc for pyenv:
vi ~/.bashrc
Content:
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source ~/.bashrc
List available python version to install:
pyenv install -l
Install the latest version of python. For example 3.10.6.
pyenv install 3.10.6
Set global python:
pyenv global 3.10.6
python --version
Update pip:
pip install --upgrade pip
Java environment
Install sdkman by running the following command.
curl -s "https://get.sdkman.io" | bash
source ~/.bashrc
Install java and maven using sdkman
sdk list maven
sdk install maven 3.8.6
sdk list java
sdk install java 11.0.12-open
Golang environment
Install the dependencies by running the following command.
sudo apt-get install bison
Install gvm by running the following command.
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /home/siavash/.gvm/scripts/gvm
List available versions
gvm listall
Install and use go
gvm install go1.4
gvm use go1.4 [--default]
Note: use --default to set permanently
List installed versions
gvm list
Docker
To install docker run the following command.
curl -fsSL https://get.docker.com | sh
Arkade
To install Arkade run the following command.
curl -sLS https://get.arkade.dev | sudo sh
Install apps
arkade get kubectl
arkade get helm
arkade get helmfile
arkade get pack
arkade get k3d
arkade get k9s
arkade get terraform
arkade get packer
arkade get tilt
arkade get trivy
arkade get yq
arkade get jq
arkade get hostctl
Update bashrc for app
vi ~/.bashrc
Content:
export PATH=$PATH:$HOME/.arkade/bin/
source <(arkade completion bash)
source <(kubectl completion bash)
source <(k3d completion bash)
source ~/.bashrc