How to install Node.js on CentOS/cPanel
January 19, 2015
Node.js via NodeSource (empfohlen)
code
curl -sL https://rpm.nodesource.com/setup_18.x | bash -
yum install -y nodejs
Build Tools (optional)
code
yum install -y gcc-c++ make
# oder
yum groupinstall "Development Tools"
Test
code
node -v
npm -v
Alternative: Source Build (legacy)
Nur wenn Pakete fehlen:
code
yum install -y gcc-c++ openssl-devel
cd /usr/local/src
wget http://nodejs.org/dist/node-latest.tar.gz
tar zxvf node-latest.tar.gz
cd node-v*
./configure
make
make install