Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Installing NodeJS on Command Line for Cent OS and cPanel

July 30, 2014 2 Comments

nodejs-npm on cent os cpanelMost cPanel servers use Cent OS as their preferred operating system, as long as you have a VPS or dedicated server with root SSH access you can install NodeJS and npm (Node Package Manager) as a root user and allow other cPanel domain users to run node and install node packages in their local directory.

Dependency Check

To install NodeJS you need a few packages already running on the server:

  • GCC 4.2 or newer
  • Python 2.6 or 2.7
  • GNU Make 3.81 or newer
  • libexecinfo (FreeBSD and OpenBSD only)

The latest version of Cent OS 6.5 has all these covered, check you have the latest

cat /etc/redhat-release

The output should be:

CentOS release 6.5 (Final)

If you don’t have these they will need to be installed with the package manager yum

Installing NodeJS

SSH in as root to your server and download the latest node.js

wget http://nodejs.org/dist/node-latest.tar.gz

Extract it

tar -xvf  node-latest.tar.gz

Rename the uncompressed archive

mv node-v0.10.29 node

Move into it

cd node

Install it with 3 commnds

./configure
make
make install

Check the version on install

node --version

Enter a node session

root@server [~]# node

> console.log('hello node');

hello node

undefined

>

(^C again to quit)

>

Remove the archive

rm ../node-v0.10.29.tar.gz

 

Using Node as a Domain User on cPanel

Now you can also use NodeJS as a regular cPanel user, you also will need SSH access to a normal shell (not jailed).

There are many packages for Node you use the command npm to see a complete list run:

npm search

This will return an exhaustive list of available packages, to install a package run npm install

npm install easyimage

To list installed packages run

npm ls

To upgrade npm packages

npm update

The packages will be stored in an invisible directory in the root of the install directory named .npm

Cats: Operating Systems, WebDev Tags: centos, node

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Google hits back after Apple exec says AI is hurting search
  • Apple: “Hundreds of millions to billions” lost without App Store commissions
  • Matter update may finally take the tedium out of setting up your smart home
  • Cue: Apple will add AI search in mobile Safari, challenging Google
  • Apps like Kindle are already taking advantage of court-mandated iOS App Store changes

RSS mac surfer

  • Tot is new text editor for Mac, iPhone, and iPad focused on constraints and ease of use
  • TiPbITS: Google Drive Sorting Can Hide New Documents
  • How to take a screenshot on a MacBook Pro
  • How To Create Simple Animation With Mac Keynote
  • Last Week on My Mac: Virus pandemics

Donate

Copyright © 2025· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2025 · gee on Genesis Framework · WordPress · Log in