Skip to content

Instantly share code, notes, and snippets.

@vmakhaev
Created November 5, 2013 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmakhaev/7316587 to your computer and use it in GitHub Desktop.
Save vmakhaev/7316587 to your computer and use it in GitHub Desktop.
Ubuntu node.js environment setup
#!/bin/sh
# ppa
# node.js
add-apt-repository -y ppa:chris-lea/node.js
# mongodb
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
# redis
add-apt-repository -y ppa:chris-lea/redis-server
# fix
rm /etc/apt/sources.list.d/10gen.list.save
rm /etc/apt/sources.list.d/10gen.list?
rm /etc/apt/sources.list.d/chris-lea-node_js-quantal.list.save
rm /etc/apt/sources.list.d/chris-lea-redis-server-quantal.list.save
# fix: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
rm /var/lib/apt/lists/* -vf
apt-get -y update
apt-get -y install nodejs
apt-get -y install mongodb-10gen
apt-get -y install redis-server
apt-get -y install git
# add nodejs user
adduser --system --shell /bin/bash --gecos 'node.js user' --group --disabled-password --home /home/nodejs nodejs
# authbind
apt-get -y install authbind
touch /etc/authbind/byport/80
chown nodejs:nodejs /etc/authbind/byport/80
chmod 755 /etc/authbind/byport/80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment