歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

centos安裝nodejs,centosnodejs

centos安裝nodejs,centosnodejs

centos安裝nodejs,centosnodejs


1.下載安裝nodejs

 1 wget http://nodejs.org/dist/v0.10.25/node-v0.10.25.tar.gz
 2 yum install gcc openssl-devel gcc-c++ compat-gcc-34 compat-gcc-34-c++
 3 tar -xf node-v0.10.25.tar.gz
 4 cd node-v0.10.25
 5 ./configure --prefix=/usr/local/node
 6 make && make install
 7 ln -s /usr/local/node/bin/* /usr/sbin/

 

2.配置npm

1 npm set prefix /usr/local
2 echo -e '\nexport PATH=/usr/local/lib/node_modules:$PATH' >> ~/.bashrc
3 source ~/.bashrc

 

 

http://xxxxxx/Linuxjc/1183625.html TechArticle

Copyright © Linux教程網 All Rights Reserved