加载中...

安装node脚本


最近用的很多脚本都是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

参考地址:

https://marshal.ohtly.com/2016/11/09/using-sshutle-on-ubuntu-server/#zai-ubuntu-server-xia-de-an-zhuang-he-ji-ben-yun-xing

https://www.jianshu.com/p/bef810c33721

https://github.com/nodesource/distributions


文章作者: Muryor
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Muryor !
评论
  目录