Skip to content

Debian 6.0 minimal setup

marioschubert edited this page Aug 22, 2012 · 6 revisions

Installing Tracks

This will install tracks with SQLite and the default built-in web server.

As root:

apt-get install git ruby1.8 rubygems1.8 sqlite3 libsqlite3-dev libxml2-dev libxslt-dev
export REALLY_GEM_UPDATE_SYSTEM=1
gem update --system
gem install bundler
cd /opt
git clone https://github.com/TracksApp/tracks.git
cd tracks

Edit Gemfile to make the following changes on the corresponding lines:

# gem "mysql"
# gem "hoe"
gem "ZenTest", "=4.6.0"
gem 'factory_girl', '~> 2.6'

Continue as root in /opt/tracks:

bundle install
adduser tracks
chown -R tracks:tracks /opt/tracks

As user tracks:

cd /opt/tracks/config
cp database.yml.tmpl database.yml
cp site.yml.tmpl site.yml
rake time:zones:local

Find your time zone in the output of the last command, e.g. "Paris". Edit site.yml: change the salt value and set your time zone.

Edit database.yml:

production:
adapter: sqlite3
database: /opt/tracks/db/tracks-production.sq3

Continue as user tracks in /opt/tracks. Initialize an empty database:

rake db:migrate RAILS_ENV=production

Try to start the service:

script/server -e production

With rails 3.2.6:

rails server -e production

If it's going well then head your browser to debian_host:3000 and check the webpage.

Setting Tracks to Start Automatically

As user tracks:

export EDITOR=nano
crontab -e

Add the following line at the bottom, then save (Ctrl+x) and exit:

@reboot /opt/tracks/script/server -d -e production

Limitations

When installed with the built-in web server, tracks provides access only through http. No https means that it is only suitable for a home network, because passwords are sent in clear text.

Clone this wiki locally