diff --git a/Install-Tracks-on-Ubuntu-20.10.md b/Install-Tracks-on-Ubuntu-20.10.md index 8c0d23a..aba9517 100644 --- a/Install-Tracks-on-Ubuntu-20.10.md +++ b/Install-Tracks-on-Ubuntu-20.10.md @@ -1,6 +1,6 @@

This is based on the previous installation guides (from where I shamelessly copy and paste several parts)

- Don't forget in case you need some help to consutl/write in the users group :
+ Don't forget in case you need some help to consult/write in the users group :
https://groups.google.com/g/tracksapp

@@ -30,6 +30,8 @@ >systemctl enable mysql
>systemctl start mysql.service

The last three lines set to automatically start Apache web server and MySQL database server when you boot and starts the MySQL (Apache is still off). For more information see [[Apache tips]] and [[MySQL tips]]

+

MySQL - change the default of default_authentication_plugin

+

Follow the instruction at [[MySQL tips#mysql---change-the-default-of-default_authentication_plugin]] to change the default authentication used by MySQL

Install Ruby

Tracks requires Ruby 2.5 or greater. Most of the testing is done with 2.6.

Install the following packages

@@ -131,121 +133,74 @@

>cp ./config/database.yml.tmpl ./config/database.yml

>cp ./config/site.yml.tmpl ./config/site.yml

-

-
-

edit the content of database.yml

you can use the nano text editor

-

>nano database.yml

+>nano database.yml

Normally you edit only the "production" section

-

the words in red are the names you need to choose for the database, the user and password. This must match what you later use when manually creates the database.

+

the words in marked are the names you need to choose for the database, the user and password. This must match what you later use when manually creates the database.

-

production:

-

adapter: mysql2

-

database: tempe -

-

encoding : utf8

-

host: localhost

-

username: daniel -

-

password: DANIEL -

+production:
+ adapter: mysql2
+ database: `tempe`
+ encoding : utf8
+ host: localhost
+ username: `daniel`
+ password: `DANIEL`

if you use sqlite

-

production:

-

adapter: sqlite3

-

database: db/tracks-20-blank.sqlite3.db

-

pool: 5

-

timeout: 5000

+production:
+ adapter: sqlite3
+ database: db/tracks-20-blank.sqlite3.db
+ pool: 5
+ timeout: 5000

edit the content of site.yml

you can use the nano text editor

-

>nano site.yml

+>nano site.yml

Choose a new secret token and set the correct time zone

-

secret_token: ''change-me''

-

time_zone: ''UTC''

-

admin_email : my.email@domain.com -

+secret_token: '`change-me`'
+time_zone: '`UTC`'
+admin_email : `my.email@domain.com`


For the time zone setting you can use the command

-

->rake --rakefile=/var/www/tracks/Rakefile time:zones:local -

-

>bundle exec rake time:zones:local

+>rake --rakefile=/var/www/tracks/Rakefile time:zones:local
+>bundle exec rake time:zones:local

to see all available timezones on your machine


If you intend to use Tracks behind a web server or reverse proxy with https enabled, ensure to set force_ssl option to true.

-

------------

-

If you are using Windows, you may need to check the ‘shebang’ lines (#!/usr/bin/env ruby) of the /public/dispatch.* files and all the files in the /script directory.

-

They are set to #!/usr/bin/env ruby by default.

-

This should work for all Unix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like #c:/ruby/bin/ruby to point to the Ruby binary on your system.

-

------------

Adjust owner and owner group for the downloaded files

-

set the owner and the owner group of all the files to www-data

+

All the files should be owned by the user ''www-data'' which is the user that runs Apache.

+

To set the owner and the owner group of all the files to www-data, at /var/www execute

-

>chown -R www-data:www-data tracks -

+>chown -R www-data:www-data tracks
-

then you need to set the access rights, the simplest way is at /var/www execute

+

then you need to set the access rights, the simplest way is at /var/www execute

-

>chmod -R 777 tracks

+>chmod -R 777 tracks

later once you have all running you can correctly set

-

-
> find /var/www/tracks -type d -exec chmod 700 '{}' \;

-

> find /var/www/tracks -type f -exec chmod 600 '{}' \;

-

> find /var/www/tracks/script -type f -exec chmod 700 '{}' \;

+> find /var/www/tracks -type d -exec chmod 700 '{}' \;
+> find /var/www/tracks -type f -exec chmod 600 '{}' \;
+> find /var/www/tracks/script -type f -exec chmod 700 '{}' \;

The ''find'' and ''chmod'' commands will set permissions as ''700'' for all directories and files inside the ''script'' directory.

All other files will have permissions set to ''600''.

-

All the files will be owned by the user ''www-data'' which is the user that runs Apache

-

------------

-

MySQL - change the default of default_authentication_plugin

-

-
-

-

since Mysql version 8.0 the default values has been changed from mysql_native_password to caching_sha2_password

-

this needs to be reverted in the cnf file

-

-
-

-

for my installation /etc/mysql/my.cnf is a symbolic link to /etc/alternatives/my.cnf which is a symbolic link to /etc/mysql/mysql.cnf

-

so we need to edit the file /etc/mysql/mysql.cnf

-

add the following at the end of the file

-
-

[mysqld]

-

default_authentication_plugin=mysql_native_password

-
-

the group [mysqld] is for the server, for the client the group is [mysql]

-

(info http://dev.mysql.com/doc/mysql/en/server-system-variables.html -

-

- https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html )

-

-
-

-

possible places of the cnf file

- + +

------------

Manually create the database

Tracks is tested on MySQL and SQLite, but PostgreSQL can also be used.