-
Notifications
You must be signed in to change notification settings - Fork 406
Installing on Ubuntu
The following packages are required at some point during the installation:
sudo apt-get update
sudo apt-get install \
build-essential ruby ruby-dev irb libmysqlclient15-dev sqlite3 libsqlite3-dev \
libcurl4-openssl-dev libopenssl-ruby libpcre3-dev libxml2-dev libxslt-dev \
libreadline5-dev apache2 apache2-prefork-dev libapr1-dev imagemagick
After this, you need to install RubyGems and Bundler.
Ruby Enterprise Edition is a version of Ruby optimized for a smaller memory footprints of deployments. It works especially well with Passenger module for Apache/nginx. It is available as an Ubuntu package from the official site.
Follow the Installing locally instructions. Move the fetched code somewhere where you will keep websites, like “/websites/teambox.mydomain.com”.
Passenger will allow Apache to run our Rails application. Install it:
sudo gem install passenger
sudo passenger-install-apache2-module
Pay attention to Apache directives given to you in the output when installation finishes. Create “/etc/apache2/mods-available/passenger.conf” and paste that info. It should look something like:
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby1.8
Create "/etc/apache2/mods-available/passenger.load* with something like:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
Enable mod_passenger:
cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/passenger.* ./
Restart apache: sudo /etc/init.d/apache2 restart
<VirtualHost *:80> Options +Indexes ServerAdmin me@mydomain.com ServerName teambox.mydomain.com
DocumentRoot /websites/teambox.mydomain.com/public
<Directory /websites/teambox.mydomain.com/public> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Options -MultiViews </Directory>
RailsEnv production </VirtualHost>
You should now have your own instance running.