Created
August 17, 2012 08:15
-
-
Save mkuhnt/3376925 to your computer and use it in GitHub Desktop.
basic-plain-vanilla-server-setup-holy-gist
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
#!/usr/bin/env bash | |
################################# | |
# This file must be run as root # | |
################################# | |
# update the system and install core components | |
apt-get update | |
apt-get -y upgrade | |
apt-get install -y git-core build-essential zlib1g-dev openssl libcurl4-openssl-dev libopenssl-ruby libxslt-dev libxml2-dev libreadline-dev libpcre3 libpcre3-dev libyaml-dev | |
# install ruby 1.9.3-p194 | |
pushd /tmp | |
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194 | |
./configure | |
make | |
make install | |
cd .. | |
rm -rf ruby-1.9.3-p194 | |
rm -rf ruby-1.9.3-p194.tar.gz | |
popd | |
# install nginx and prepare basic configuration | |
apt-get -y install nginx | |
# Example config file http://github.com/defunkt/unicorn/blob/master/examples/nginx.conf to /etc/nginx | |
# Eventually provide a separate user for nginx (http://sirupsen.com/setting-up-unicorn-with-nginx) | |
# Add a deploy user | |
# adduser deploy | |
# echo "deploy ALL=(ALL) NOPASSWD: /user/local/bin/bluepill" >> /etc/sudoers | |
# install mysql server | |
apt-get install -y mysql-server libmysqlclient-dev | |
# install core gems | |
gem install bundle | |
gem install rake | |
gem install unicorn | |
gem install bluepill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment