# mkdir ~/sources # cd ~/sources # wget # tar zxvf # cd node-v #. # yum install openssl-devel # yum install gcc-c++ - OR - # yum groupinstall 'Development Tools' Install NodeJS Give it a try: # yum install nodejs Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: * extras: * updates: Setting up Install Process No package nodejs available. NodeJS is currently not part of the CentOS standard repo's Wednesday, Ma How to Install NodeJS on CentOS 1.2 NodeJS is currently not part of the CentOS standard repo's.This answer has the same disadvantages as previously mentioned for compiling from source. Sudo ln -s /usr/local/bin/node-waf /usr/bin/node-wafįrankly, the situation for node.js on CentOS/RHEL is rather bad, as none of the repos include node.js (see related question here). Sudo ln -s /usr/local/bin/npm /usr/bin/npm Sudo ln -s /usr/local/lib/node /usr/lib/node sudo ln -s /usr/local/bin/node /usr/bin/node Might not be needed depending on your version. Sudo tar xzvf ~/node-v0.8.22-linux-圆4.tar.gz -strip=1Īnd for me on CentOS 6.3, I had to add the following links so that node and npm commands worked from either regular user or from sudo. Latest_node=$(curl | grep 'linux-圆4.tar.gz' | awk '') Here's the script I use: # get the latest stable binary There's one more approach I haven't seen listed in any of the other answers, and that is to use the binary distributions for Linux which have been published since 0.8.6 Then install and check the version: # rpm -ivh nodejs-0.8.18-1.x86_64.rpm Now make the nodejs package: # fpm -s dir -t rpm -n nodejs -v 0.8.18 -C /tmp/nodejs/ usr/bin usr/lib To create an RPM package, you can use FPM: # wget You can modify the "configure" file to point to python2.7 in line 1 if necessary. Note that this requires Python 2.6+ to use. (cd into extracted folder: ex "cd node-v0.10.3")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |