Skip to content

Instantly share code, notes, and snippets.

@aminelaadhari
Created February 4, 2013 21:23
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 aminelaadhari/4709835 to your computer and use it in GitHub Desktop.
Save aminelaadhari/4709835 to your computer and use it in GitHub Desktop.
#!/bin/sh
# 1. Sign up at https://www.digitalocean.com
# 2. Go to: https://www.digitalocean.com/droplets
# 3. Create Ubuntu 12.10 x64 server droplet
# 4. Get email with root credentials, IP and password
# 5. Open terminal on a Mac
# 6. SSH into into server as root: ssh -l root IPADDRESS-FROM-EMAIL
# 7. Enter root Password
# 8. Create this script: nano deployd-install.sh
# 9. Copy & paste entire script here into nano
# 10. 'CTRL + X' && 'y' to save
# 11. Set permissions: chmod 777 deployd-install.sh
# 12. Run install script: ./deployd-install.sh
# 13. Run testproj: dpd -p 80
# 14. View at your IP address
# Add MongoDB Package
echo 'Add MongoDB Package'
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'MongoDB Package completed'
# Update System
echo 'System Update'
apt-get -y update
echo 'Update completed'
# Install help app
apt-get -y install libssl-dev git-core pkg-config build-essential curl gcc g++ checkinstall
# Download & Unpack Node.js - v. 0.8.17
echo 'Download Node.js - v. 0.8.17'
mkdir /tmp/node-install
cd /tmp/node-install
wget http://nodejs.org/dist/v0.8.17/node-v0.8.17.tar.gz
tar -zxf node-v0.8.17.tar.gz
echo 'Node.js download & unpack completed'
# Install Node.js
echo 'Install Node.js'
cd node-v0.8.17
./configure && make && checkinstall --install=yes --pkgname=nodejs --pkgversion "0.8.17" --default
echo 'Node.js install completed'
# Install MongoDB
echo 'Install MongoDB'
apt-get -y install mongodb-10gen
echo 'MongoDB install completed.'
# Install Deployd
echo 'Install Deployd'
npm install -g deployd
echo 'Deployd install completed'
# Create Project folder
echo 'Creating Project'
dpd create testproj
cd testproj
echo 'Test Project completed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment