-
Notifications
You must be signed in to change notification settings - Fork 406
Installing on Ubuntu
Juan Jaramillo wrote an excellent article about Installing Teambox on Ubuntu. This guide is based on his article.
This guide has been tested for Ubuntu 8.04.3 LTS.
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
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.
Download Teambox code to “/websites/teambox.mydomain.com” with git:
git clone git://github.com/micho/teambox.git /websites/teambox.mydomain.com
Install required gems:
bundle install
Edit config/teambox.yml to set your domain name and email information.
A good service for outgoing email is Sendgrid. You can also use GMail.
host: smtp.sendgrid.net
username: your@username.com
password: your_password
auth: plain
port: 25
enable_starttls_auto: false
Edit config/databases.yml, and set your database user and pass under production. (Others are optional, only used for development)
Build the database (replace the =production with =development if you want to build the development environment as well).
RAILS_ENV=production rake db:create
RAILS_ENV=production rake db:auto:migrate
We will now run a basic server to test the installation. Inside the directory where you installed Teambox, type:
script/server -e production
Now browse to http://localhost:3000 (substitute “localhost” for your domain name if you’re on a remote server), you should see a server with your Teambox copy.
If this is working, we’ll now install Passenger to get it running properly from Apache.
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.