阿里云Center OS 安装node

https://help.aliyun.com/document_detail/50775.html

http://www.cnblogs.com/xiashan17/p/5910618.html (推荐)

https://bbs.aliyun.com/read/146189.html

配置Node.js环境中的Linux 环境变量

http://jingyan.baidu.com/article/25648fc18ee5bd9190fd0058.html

思考 .bashrc和profile的区别 都是设置环境变量?

设置global路径为用户目录

npm config set prefix ~/npm

将~/npm/bin路径加到PATH变量中

echo -e '\nexport PATH=~/npm/bin:$PATH' >> ~/.bashrc

重新载入.bashrc

source ~/.bashrc

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容