Skip to content

Instantly share code, notes, and snippets.

@rafaelrosafu
Last active December 21, 2015 04:49
Show Gist options
  • Save rafaelrosafu/6252719 to your computer and use it in GitHub Desktop.
Save rafaelrosafu/6252719 to your computer and use it in GitHub Desktop.
Node install for #hackmtl
# Create a new, non-root user
adduser node
echo "node ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
su - node
# Install git
sudo yum install git
# Install node.js through nave
cd ~
mkdir .nave
cd .nave
wget https://raw.github.com/isaacs/nave/master/nave.sh
sudo chmod +x nave.sh
sudo ln -s $PWD/nave.sh /usr/local/bin/nave
cd ~
nave install 0.10.15
nave use 0.10.15
node -v
# Run sample app
git clone https://github.com/heroku/node-js-sample.git
cd node-js-sample
npm install
node web.js
# Install PhantomJS, thanks to http://www.sameerhalai.com/blog/how-to-install-phantomjs-on-a-centos-server/
cd /tmp
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
tar xvf phantomjs-1.9.1-linux-x86_64.tar.bz2
sudo cp phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/local/bin/
sudo yum install freetype fontconfig
phantomjs phantomjs-1.9.1-linux-x86_64/examples/hello.js
# Install Yeoman and friends
cd ~
nave use 0.10.15
npm install -g yo
npm install -g generator-webapp
mkdir test_app
cd test_app
yo webapp
# allow process to be seen from the outside
sed -i 's/localhost/0.0.0.0/g' Gruntfile.js
grunt --force
grunt server --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment