View LinuxGeneral
Submitted by Justin Francis:
This is just a quick step-by-step howto for MANUALLY getting Tracks up and running on Trustix Secure Linux with MySQL. I presume these instructions will work for Linux in general as we will be performing our own compiling and such.
INSTALLING RUBY 1.8.4
Download ruby-1.8.4.tar.gz (from ftp://ftp.ruby-lang.org/pub/ruby/1.8) into /tmp
cd /tmp && tar -zxvf ruby-1.8.4.tar.gz && cd ruby-1.8.4 && ./configure && make && make install
cd /usr/bin && ln -s ../local/bin/ruby ruby
INSTALLING RAKE 0.7.3
Download rake-0.7.3.tgz (from http://rubyforge.org/frs/?group_id=50) into /tmp
cd /tmp && tar -zxvf rake-0.7.3.tgz && cd rake-0.7.3 && ruby install.rb
INSTALLING RUBYGEMS 0.9.2
Download rubygems-0.9.2.tgz (from http://rubyforge.org/frs/?group_id=126) into /tmp
cd /tmp && tar -zxvf rubygems-0.9.2.tgz && cd rubygems-0.9.2 && ruby setup.rb
CONFIGURING MYSQL
mysql -u root -p
mysql> create database tracks1043;
mysql> grant all privileges on track1043.* to root@localhost identified by 'your-desired-password' with grant option;
mysql> quit;
INSTALLING AND CONFIGURING TRACKS 1.043
Download tracks-1.043.zip file into the directory of your choice.
cd /path_to_tracks_download_directory/ && unzip tracks-1.043.zip && cd tracks-1.043
Modify /path/to/tracks-1.043/config/database.yml:
- comment out all SQLite lines
- uncomment all MySQL lines
- determine the path to your mysql.sock file:
mysqladmin --verbose | grep ^socket - add
socket: /path/to/mysql[d].sockto each MySQL environment
- set each environment’s user and password sections according to your MySQL setup (above)
Modify /path/to/tracks-1.043/config/environment.rb:
- change the value of the SALT variable to your liking
- change ENV[‘TZ’] to ‘YOUR_COUNTRY_CODE/your_timezone’ (i.e. “US/Central”), if desired
Modify /path/to/tracks-1.043/db/migrate/001_create_tracks_db.rb (due to invalid default date value error):
- change the default year from ‘0000’ to ‘9999’ in the datetime line for the ‘created’ field in the ‘todo’ table section
Modify /path/to/tracks-1.043/db/migrate/004_notes.rb (same reason as above):
- change two occurrences of the default year ‘0000’ to ‘9999’
Modify /path/to/tracks-1.043/app/controllers/login_controller.rb:
- change default email address from ‘butshesagirl…” to something company related (i.e. your_email@your_company.com)
Modify /path/to/tracks-1.043/db/migrate/006_add_preferences_to_user_table.rb:
- change default email address from ‘butshesagirl…” to something company related (i.e. your_email@your_company.com)
Modify /path/to/tracks-1.043/test/fixtures/user.yml, if desired:
- change two occurrences of the default email address from ‘butshesagirl…” to something company related (i.e. your_email@your_company.com)
POPULATE DEFAULT TABLE RECORDS AND START THE TRACKS SERVER (with the default web server)
cd /path/to/tracks-1.043/ && rake migrate && ./scripts/server
TEST YOUR NEW TRACKS SERVER
Navigate to http://address_of_tracks_server:3000/signup to create a new account
Navigate to http://address_of_tracks_server:3000/login to access Tracks at any timeEnjoy!
see also Linux Debian
see also LinuxUbuntuCategories: