Fix markup for code bits.

ms705 2011-12-20 09:12:01 -08:00
parent 744ec1f7c4
commit a992114898

@ -10,16 +10,13 @@ In these instructions some things may be different from set up to set up. Some w
h3. 1 - Installing all dependencies
<code>
$ sudo tasksel install lamp-server
<pre><code>$ sudo tasksel install lamp-server
$ sudo aptitude install ruby libdbd-mysql-ruby rake libopenssl-ruby libapache2-mod-passenger
</code>
$ sudo aptitude install ruby libdbd-mysql-ruby rake libopenssl-ruby libapache2-mod-passenger</code></pre>
h3. 2 - Download and set permissions for tracks
<code>
$ wget http://github.com/bsag/tracks/zipball/1.7.1
<pre><code>$ wget http://github.com/bsag/tracks/zipball/1.7.1
$ unzip ./bsag-tracks-1.7.1-0-g13db454.zip
@ -38,7 +35,7 @@ $ sudo find /var/lib/tracks -type f -exec chmod 600 '{}' \;
$ sudo find /var/lib/tracks/script -type f -exec chmod 700 '{}' \;
$ sudo ln -s /var/lib/tracks/public /var/www/tracks
</code>
</code></pre>
<b>Note:</b> the zip and extracted directory filenames will probably be different
<b>Note:</b> it's not possible to move the configuration files to ''/etc'' as is usual with Debian applications without having to change the code. If such is desired, the file ''config/boot.rb'' will require some editing.
@ -47,7 +44,7 @@ The ''find'' and ''chmod'' commands will set permissions as ''700'' for all dire
h3. 3 - Create MySQL database
<code>
<pre><code>
$ sudo mysql -u root -p
mysql> CREATE DATABASE tracks;
Query OK, 1 row affected (0.03 sec)
@ -57,7 +54,7 @@ Query OK, 0 rows affected (0.08 sec)
mysql> quit;
Bye
</code>
</code></pre>
<b>Note:</b> if you choose a different database name, MySQL user to access the database or different password, they'll have to be change accordingly here and on the following. It's not difficult to do so, just requires a bit of extra attention.
@ -65,31 +62,29 @@ h3. 4 - Configure tracks
The file ''config/database.yml'' needs to be edited. Edit ONLY the production section
<code>
<pre><code>
production:
adapter: mysql
database: tracks
host: localhost
username: tracksuser
password: trackspassword
</code>
</code></pre>
The file ''config/site.yml'' needs to be edited. Choose a new salt word and set the correct time zone. The only things that need to be changed are
<code>
<pre><code>
salt: ''change-me''
</code>
<code>
time_zone: ''UTC''
</code>
</code></pre>
To get a list of available time zones, use the command
<code>
$ sudo rake --rakefile=/var/lib/tracks/Rakefile time:zones:local
</code>
<pre><code>$ sudo rake --rakefile=/var/lib/tracks/Rakefile time:zones:local
</code></pre>
h3. 5 - Populate database
@ -101,12 +96,11 @@ h3. 6 - Configure and restart apache
Create a file for the tracks application on apache configuration and set it to use Passenger
<code>
$ echo "RailsBaseURI /tracks" | sudo tee /etc/apache2/conf.d/tracks.conf
<pre><code>$ echo "RailsBaseURI /tracks" | sudo tee /etc/apache2/conf.d/tracks.conf
$ sudo mv /var/lib/tracks/public/.htaccess /var/lib/tracks/public/.dontneedhtaccess
$ sudo /etc/init.d/apache2 restart
</code>
</code></pre>
Open the URL http://localhost/tracks to start tracks. Whatever is the URL of your webserver, just add tracks to access to it remotely.