阿里雲 centos7node
node v8.11.3npm
npm 5.6.0vim
npm update
ping registry.npmjs.org
發現https://registry.npmjs.org 網址ping不通centos
查看/etc/resolv.conf服務器
vim /etc/resolv.conf
發現這個文件的dns服務器被修改成了 127.0.0.1dom
參考其餘阿里雲服務器的dns服務器配置,將其修改以下阿里雲
options timeout:2 attempts:3 rotate single-request-reopen ; generated by /usr/sbin/dhclient-script nameserver 100.100.2.138 nameserver 100.100.2.136 search localdomain
從新ping registry.npmjs.org 成功centos7
ping registry.npmjs.org
執行npm update也成功spa