Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save solisoft/184420 to your computer and use it in GitHub Desktop.
Save solisoft/184420 to your computer and use it in GitHub Desktop.
Ubuntu nginx / passenger / mysql / mongodb
# Ubuntu 32bits Nginx / Passenger / Ruby on Rails
apt-get update
apt-get upgrade
aptitude install build-essential ruby1.8 ruby1.8-dev imagemagick libmagick++9-dev rdoc libopenssl-ruby libxslt-dev libssl-dev
aptitude install make g++ openssl libcurl4-openssl-dev sendmail git-core
aptitude install fail2ban chkrootkit mailx
mkdir /home/src
cd /home/src
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar -xf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb
ln -s /usr/bin/gem1.8 /usr/bin/gem
gem update --system
gem install rake rails passenger rmagick RedCloth haml capistrano capistrano-ext --no-ri --no-rdoc
passenger-install-nginx-module
aptitude remove bind9
# MySQL Installation
aptitude install mysql-server libmysql++-dev
gem install mysql
# mongoDB Installation
# Notice that is only for 32Bits versions
cd /home/src
wget http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.0.tgz
mkdir /home/mongodb_data
tar -xf mongodb-linux-i686-1.4.0.tgz
mv /home/src/mongodb-linux-i686-1.4.0 /opt/mongodb
cd /etc/init.d/
wget http://gist.github.com/raw/184398/fa590339d85ca39171e1d227e76b44ce9ac986a0/mongodb
chmod +x mongodb
update-rc.d mongodb defaults
# Shorewall Configuration
aptitude install shorewall-common shorewall-doc
cp /usr/share/doc/shorewall-common/examples/two-interfaces/* /etc/shorewall/
# TODO > Config Files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment