2021/2/22: nodejsのv8を削除、14を追加 golangの1.16を追加

2021/5/27: nodejsのv16を追加、golangの1.16を1.16.4へ更新

VPS起動後に毎回調べるのが面倒になったのでメモです

Ubuntu20.04 LTS rootであることが前提です

Nodejs

詳細の書かれたページ

#v16
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs

#v14
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs

#v12
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs

14や12の部分を変更すれば15,10も可能

Golang

ダウンロードページ

#1.16
wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz
rm ./go1.16.4.linux-amd64.tar.gz

#1.13
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
rm ./go1.13.linux-amd64.tar.gz


#パス通すとき
export PATH=$PATH:/usr/local/go/bin

Rust

rustupのページ

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env