Skip to content

Instantly share code, notes, and snippets.

@benhoIIand
Last active November 25, 2015 18:47
Show Gist options
  • Save benhoIIand/8874957 to your computer and use it in GitHub Desktop.
Save benhoIIand/8874957 to your computer and use it in GitHub Desktop.
Server install script
#!/bin/bash
# Install cURL
sudo apt-get install curl
# Install LAMP stack
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
sudo nano /etc/apache2/mods-enabled/dir.conf
sudo nano /var/www/info.php
sudo service apache2 restart
# Create our template for new sites
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/template
nano /etc/apache2/sites-available/template
# Create our default.html page for new sites
sudo echo "<h1>Yo, it's a new site... bitch" > /var/www/default.html
# Install phpMyAdmin
sudo apt-get install phpmyadmin
# “Include /etc/phpmyadmin/apache.conf”
sudo nano /etc/apache2/apache2.conf
sudo service apache2 restart
# Install Git
sudo apt-get install git-core
# Install NodeJS
sudo apt-get install software-properties-common
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
#Install MongoDB
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
apt-get -y update
apt-get -y install mongodb-10gen
#Install Ruby
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby rubygems ruby-switch
sudo apt-get install ruby1.9.1 ruby1.9.1-dev
sudo gem install rails
sudo apt-get install libsqlite3-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment