Created
January 6, 2010 16:14
-
-
Save barinek/270377 to your computer and use it in GitHub Desktop.
nginx with thin and monk
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 | |
source /etc/profile | |
for ruby_package in ruby-ri-1.8.5 ruby-rdoc-1.8.5 ruby-irb-1.8.5 ruby-docs-1.8.5 ruby-tcltk-1.8.5 ruby-1.8.5 ruby-mode-1.8.5 rrdtool-ruby-1.2.27 ruby-devel-1.8.5.x86_64 ruby-devel-1.8.5.i386 ruby-libs-1.8.5.x86_64 ruby-libs-1.8.5.i386 | |
do | |
if rpm -q $ruby_package >/dev/null; then | |
echo $ruby_package | |
rpm -e $ruby_package; | |
fi | |
done | |
rm -rf /usr/lib/ruby | |
rm -rf /usr/lib64/ruby | |
yum install -y fontconfig-devel freetype-devel glib2-devel libjpeg-devel libpng-devel libtiff-devel libwmf-devel libxslt libxslt-devel openssl-devel readline-devel zlib zlib-devel sqlite sqlite3 sqlite3-devel pcre-devel | |
wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz | |
tar -zxvf ruby-1.8.7.tar.gz | |
cd ruby-1.8.7 | |
./configure --with-openssl-dir=/usr/lib/openssl | |
make | |
make install | |
/usr/local/bin/ruby -v | |
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz | |
tar -zxvf rubygems-1.3.5.tgz | |
cd rubygems-1.3.5 | |
/usr/local/bin/ruby setup.rb | |
/usr/local/bin/gem -v | |
/usr/local/bin/gem source -a http://gems.rubyforge.org/ | |
/usr/local/bin/gem update --system | |
/usr/local/bin/gem install monk --no-rdoc --no-ri --version 0.0.7 | |
/usr/local/bin/gem install rake xml-simple nokogiri --no-rdoc --no-ri | |
/usr/local/bin/gem install rack --no-rdoc --no-ri --version 1.1.0 | |
/usr/local/bin/gem install thin --no-rdoc --no-ri --version 1.2.5 | |
wget http://sysoev.ru/nginx/nginx-0.8.4.tar.gz | |
tar -zxf nginx-0.8.4.tar.gz | |
cd nginx-0.8.4 | |
./configure --prefix=/opt/nginx --with-http_ssl_module | |
make | |
make install | |
mv /opt/nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf_backup | |
mv $ATTACH_DIR/nginx.conf /opt/nginx/conf/nginx.conf | |
mkdir -p /opt/applications | |
cd /opt/applications | |
/usr/local/bin/monk init example | |
cp /opt/applications/example/config/settings.example.yml /opt/applications/example/config/settings.yml | |
cp /opt/applications/example/config/redis/development.example.conf /opt/applications/example/config/redis/production.conf | |
chown -R username:username /opt/applications | |
mkdir /etc/thin | |
/usr/local/bin/thin install | |
/usr/local/bin/thin config -C /etc/thin/example.yml -c /opt/applications/example --servers 4 -e production -l /var/log/thin -R /opt/applications/example/config.ru -S /tmp/thin.sock | |
service thin start | |
/opt/nginx/sbin/nginx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment