最近用的很多脚本都是node的,但是apt和yum源的node版本都太老了。
自己手动安装也很费事,好在官网提供了换源的脚本,可以一键安装指定版本node。
Debian系
Node.js v15.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_15.x | bash -
apt-get install -y nodejs
Node.js v14.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
Node.js v12.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
Node.js v10.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
Node.js LTS (v14.x):
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install -y nodejs
Node.js Current (v15.x):
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_current.x | bash -
apt-get install -y nodejs
红帽系
Node.js v15.x
# As root
curl -sL https://rpm.nodesource.com/setup_15.x | bash -
# No root privileges
curl -sL https://rpm.nodesource.com/setup_15.x | sudo bash -
Node.js v14.x
# As root
curl -sL https://rpm.nodesource.com/setup_14.x | bash -
# No root privileges
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
Node.js v12.x
# As root
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
# No root privileges
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
Node.js v10.x
# As root
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
# No root privileges
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
Node.js LTS (14.x)
# As root
curl -sL https://rpm.nodesource.com/setup_lts.x | bash -
# No root privileges
curl -sL https://rpm.nodesource.com/setup_lts.x | sudo bash -
Node.js Current (15.x)
# As root
curl -sL https://rpm.nodesource.com/setup_current.x | bash -
# No root privileges
curl -sL https://rpm.nodesource.com/setup_current.x | sudo bash -
服务器使用本地代理的方法
在ubuntu server下的安装和基本运行
安装:
sudo apt-get install sshuttle
最基本使用:
sshuttle --dns -r username@sshserver 0.0.0.0/0 -v
参考地址: