Created
November 5, 2013 09:58
-
-
Save vmakhaev/7316587 to your computer and use it in GitHub Desktop.
Ubuntu node.js environment setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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