命令装置
1、下载 node 源
# 科大源:https://mirrors.ustc.edu.cn/nodesource/rpm/
curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -
2、装置
sudo yum -y install nodejs
删除
sudo yum remove nodejs
docker 装置
FROM centos:7
RUN curl --silent --location https://rpm.nodesource.com/setup_12.x | bash - \
&& yum -y install nodejs
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" >> /etc/timezone \