-
-
Notifications
You must be signed in to change notification settings - Fork 537
Opensolaris
Submitted by carylt
Installing Tracks 1.7 on OpenSolaris 2009.06 using the MySQL 5.0 database in 10 steps
All the commands described in this document are to be executed by a user with the Primary Administrator role (The user created when installing OpenSolaris is granted this role automatically).
Step 1 – Download the Tracks 1.7 zip file, unzip it in your preferred location and change to that directory.
This document is written assuming the Tracks software is installed in /opt
$ cd /opt
$ pfexec unzip tracks-current.zip
$ cd tracks-1.7
Step 2 – Configure the OpenSolaris publisher repositories needed to install the MySQL Ruby Gem package
OpenSolaris 2009.06 is delivered with Ruby 1.8.7, which contains Ruby and RubyGems, but rather than recompiling ourselves the MySQL Ruby Gem it’s easier to simply install it directly from the OpenSolaris Contrib repository.
So we will need to add this repository to the list of available publishers of packages:
$ pfexec pkg set-publisher -O http://pkg.opensolaris.org/contrib Contrib
Now we can simply install the ruby-mysql package
$ pfexec pkg install ruby-mysql
Install MySQL 5.0:
$ pfexec pkg install SUNWmysql5
Start MySQL 5.0:
$ pfexec svcadm enable mysql
Creating a new user account:
$ /usr/mysql/5.0/bin/mysql -u root
mysql> CREATE DATABASE tracks17;
mysql> GRANT ALL ON tracks17.* TO 'mysql'@'localhost' IDENTIFIED BY 'mysql';
Edit the file /opt/tracks-1.7/vendor/rails/activesupport/lib/active_support/inflector.rb
Go to line 275, and add a “rescue” statement so that part of the code reads:
def transliterate(string)
Iconv.iconv('ascii//ignore//translit', 'utf-8', string).to_s
rescue
end
$ pfexec gem install rake
Open file /opt/tracks-1.7/config/database.yml and edit the production section to look like:
production:
adapter: mysql
host: localhost
username: mysql
password: mysql
database: tracks17
Open file /opt/tracks-1.7/config/site.yml
Change the line saying salt: “change-me” to a string of your choice.
Change the line saying time_zone: “UTC” to your time zone.
You can use the command
$ /var/ruby/1.8/gem_home/bin/rake time:zones:local
to see all available timezones on your machine and test that your Ruby installation is working as intended.
If it doesn’t, chances are you missed Step 5.
$ pfexec rake db:migrate RAILS_ENV=production
$ pfexec script/server -e production
Now point your browser to http://127.0.0.1:3000 check that the application is working and create an admin user for Tracks.