Created
October 16, 2013 13:17
-
-
Save soyuka/7007577 to your computer and use it in GitHub Desktop.
Node.js and mongodb installation shell — Debian Wheezy
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/bash | |
# Adding mongodb source | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | tee /etc/apt/sources.list.d/10gen.list | |
apt-get update | |
# Dependecies | |
# whois = mkpasswd | |
apt-get install mongodb-10gen git-core curl build-essential openssl libssl-dev whois -y | |
#Install node js | |
git clone https://github.com/joyent/node.git | |
cd node | |
# 'git tag' shows all available versions: select the latest stable. | |
git checkout v0.10.20 | |
# Configure seems not to find libssl by default so we give it an explicit pointer. | |
# Optionally: you can isolate node by adding --prefix=/opt/node | |
./configure --openssl-libpath=/usr/lib/ssl | |
make | |
make test | |
make install | |
# it's alive ? | |
if [ -z $(node -v) && -z $(npm -v) ] | |
then | |
exit 0 | |
else | |
#facultative pm2 installation | |
npm install pm2 -g | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment