-
-
Save ysaito8015/d8f19412ddb21159b8b9 to your computer and use it in GitHub Desktop.
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 | |
set -e | |
set -x | |
apt-get update | |
apt-get upgrade | |
apt-get -y install build-essential curl git-core openssl libreadline6 libreadline6-dev \ | |
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \ | |
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion libcurl4-openssl-dev \ | |
libpcre3 libpcre3-dev libpq5 libpq-dev htop vim-nox redis-server imagemagick | |
wget -O chruby-0.3.6.tar.gz https://github.com/postmodern/chruby/archive/v0.3.6.tar.gz | |
tar -xzvf chruby-0.3.6.tar.gz | |
cd chruby-0.3.6/ | |
make install | |
cd .. | |
wget -O ruby-install-0.2.1.tar.gz https://github.com/postmodern/ruby-install/archive/v0.2.1.tar.gz | |
tar -xzvf ruby-install-0.2.1.tar.gz | |
cd ruby-install-0.2.1/ | |
make install | |
ruby-install -i /usr/local ruby 2.0.0-p195 | |
echo "source /usr/local/share/chruby/chruby.sh" >> /etc/profile.d/chruby.sh && chmod u+x /etc/profile.d/chruby.sh | |
gem install passenger --verbose --no-ri --no-rdoc | |
passenger-install-nginx-module --prefix=/opt/nginx --auto --auto-download --extra-configure-flags="--with-http_ssl_module" | |
echo "pid /var/run/nginx.pid;" >> /opt/nginx/conf/nginx.conf | |
curl -o /etc/init.d/nginx https://raw.github.com/gist/1405605 | |
chmod +x /etc/init.d/nginx | |
/usr/sbin/update-rc.d -f nginx defaults | |
/etc/init.d/nginx start | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment