1.设置包源
curl --silent --location https://rpm.nodesource.com/setup_12.x | bash -
如果你要安装14.x以上版本直接将 12.x修改为14.x就好了,同理安装8.x就修改为8.x
2.安装
yum install nodejs -y
3.验证
node -v
curl --silent --location https://rpm.nodesource.com/setup_12.x | bash -
如果你要安装14.x以上版本直接将 12.x修改为14.x就好了,同理安装8.x就修改为8.x
yum install nodejs -y
node -v
本文标题:Centos安装NodeJS
本文链接:https://www.haomeiwen.com/subject/bbxjiktx.html
网友评论