curl -sL https://rpm.nodesource.com/setup_14.x | bash -
yum install -y nodejs
node -v
npm -v
npm install -g cnpm - -registry=https://registry.npm.taobao.org
npm install -g yarn
yarn -v
切换到 root 用户,
su - root
给sudoers文件权限
chmod 755 sudoers
编辑 sudoers文件
vim /etc/sudoers
例如:
root ALL=(ALL) ALL
xxx ALL=(ALL) ALL
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
yum check-update
sudo yum install code
这样就可以做测试玩耍了。