Skip to content

Instantly share code, notes, and snippets.

@barroso
Created September 20, 2011 23:50
Show Gist options
  • Save barroso/1230763 to your computer and use it in GitHub Desktop.
Save barroso/1230763 to your computer and use it in GitHub Desktop.
Instalação nodejs no ubuntu
#caso não tenha
sudo apt-get install git
sudo apt-get install curl python libssl-dev
mkdir ~/nodejs/
cd ~/nodejs/
git clone git://github.com/joyent/node.git
#versão
git checkout v0.4.11
export JOBS=2 # Este comando configura o num. de comandos que sao executados em paralelo
mkdir ~/local # Esta e a pasta onde vai ficar a instalacao do node
./configure --prefix=$HOME/local/node # Aqui configuramos o caminho da instalacao do node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile
echo 'export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules' >> ~/.profile
source ~/.profile
#npm para o NodeJS, instalação de modulos
curl http://npmjs.org/install.sh | sh
@jorgeguberte
Copy link

Segui as instruções do repo da joyent e a exportação do PATH não funcionou. Nesse exemplo funcionou. Valeu barroso.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment