Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing node.js on dedicated server

Tags:

linux

node.js

ok so I got a dedicated linux server and I'm trying to install node.js

i ran

wget http://nodejs.org/dist/node-v0.4.11.tar.gz
tar zxf node-v0.4.11.tar.gz
cd node-v0.4.11

all is well

then i ran

 ./configure

and i got

Checking for program g++ or c++          : not found 
Checking for program icpc                : not found 
Checking for program c++                 : not found 
wscript:232: error: could not configure a cxx compiler!

so i google that error if found a page that says run this

 sudo apt-get install build-essential libssl-dev curl git-core

but then i get

-bash: sudo: command not found

please help me I don't know what to do now

like image 630
mcgrailm Avatar asked Jan 15 '12 00:01

mcgrailm


People also ask

Does NodeJS need to be installed on the server?

You can run the Node. js application directly from shell, however in order to make sure that it survives server restarts and potential crashes, it should be installed as a service.

Can we install node js in Windows server?

For the purposes of training or exploring the possibilities, you can install a Node. js directly in Windows.


1 Answers

If you are running some debian based distro, that code should work. Since you are running CentOS, you can follow this link. Different linux distros use different package managers. It looks like that debian is the most popular (ubuntu, mint, debian...) so many online tutorials you find use apt to get everything installed. Your choice is different and you should use rpm/yum. Since you are missing gcc compiler, you should try executing this command (you should probably add some more packages, not sure):

yum install sudo gcc-c++

EDIT: Updated link to serverfault.com

like image 138
Aleksandar Vucetic Avatar answered Sep 22 '22 15:09

Aleksandar Vucetic