Updated Install Tracks on Ubuntu 20.10 (markdown)

ghost-from-the-past 2021-04-14 15:54:42 +02:00
parent 26658e21f0
commit 530caf3d80

@ -164,7 +164,7 @@ admin_email : <b>my.email@domain.com</b><br/>
<p>For the time zone setting you can use the command</p>
<blockquote>
<s>&gt;rake --rakefile=/var/www/tracks/Rakefile time:zones:local</s><br/>
&gt;bundle <span class="pl-c1">exec</span> rake time:zones:local
&gt;bundle exec rake time:zones:local
</blockquote>
<p>to see all available timezones on your machine</p>
<h3>Adjust owner and owner group for the downloaded files</h3>
@ -210,7 +210,7 @@ mysql&gt; quit
<blockquote>
<p>&gt;systemctl restart mysql.service</p>
</blockquote>
<p>you can use the following that MySQL is running ok</p>
<p>you can use the following to check that MySQL is running ok</p>
<blockquote>
<p>&gt;systemctl status mysql.service</p>
</blockquote>
@ -236,34 +236,21 @@ mysql&gt; quit
&gt;bundle update
</blockquote>
<h3>Populate database</h3>
<p>This will set up your database with the required structure to hold Tracks data.</p>
<p>go to the directory where you installed Tracks and run</p>
<p>This will set up your database with the required structure to hold Tracks data.</p>
<p>going to the directory where Tracks is installed run</p>
<blockquote>
<p>&gt;cd /var/www/tracks</p>
<p>
<s>&gt;rake --rakefile=/var/www/tracks/Rakefile db:migrate RAILS_ENV=production</s>
</p>
<p>&gt;bundle <span class="pl-c1">exec</span> rake db:migrate RAILS_ENV=production</p>
&gt;cd /var/www/tracks<br/>
<s>&gt;rake --rakefile=/var/www/tracks/Rakefile db:migrate RAILS_ENV=production</s><br/>
&gt;bundle exec rake db:migrate RAILS_ENV=production
</blockquote>
<p>------------</p>
<h3>Precompile assets</h3>
<p>Static assets (images, stylesheets, and javascript) need to be compiled in order for them to work correctly with the new asset pipeline feature in Rails.</p>
<p>go to the directory where you installed Tracks and run</p>
<p>going to the directory where Tracks is installed run</p>
<blockquote>
<p>&gt;cd /var/www/tracks</p>
<p>
<s>&gt;rake --rakefile=/var/www/tracks/Rakefile assets:precompile RAILS_ENV=production</s>
</p>
<p>&gt;bundle <span class="pl-c1">exec</span> rake assets:precompile RAILS_ENV=production</p>
&gt;cd /var/www/tracks<br/>
<s>&gt;rake --rakefile=/var/www/tracks/Rakefile assets:precompile RAILS_ENV=production</s><br/>
&gt;bundle exec rake assets:precompile RAILS_ENV=production
</blockquote>
<p>------------</p>
<p>ToDo: test this</p>
<p>
<br/>
</p>
<p>Optional; if you don't have SSL certificate<br/> <br/>generate certificates, e.g. in /home/ubuntu/certificates<br/> <br/>&gt;openssl req -newkey rsa:2048 -nodes -keyout key.pem -out req.pem<br/>&gt;openssl x509 -req -days 365 -in req.pem -signkey key.pem -out cert.pem<br/> <br/>Run tracks with thin + ssl</p>
<p>(in tracks-2.3.0 folder)<br/> <br/>&gt;bundle exec thin start -e production --ssl --ssl-verify --ssl-key-file /home/ubuntu/certificates/key.pem --ssl-cert-file /home/ubuntu/certificates/cert.pem</p>
<p>------------</p>
<h3>Run Apache</h3>
<h4>Enable module rewrite</h4>
<blockquote>&gt;a2enmod rewrite</blockquote>
@ -271,24 +258,12 @@ mysql&gt; quit
<blockquote>&gt;systemctl restart apache2</blockquote>
<p>you can check the status, to see that up to here everything is ok, with</p>
<blockquote>
<p>&gt;systemctl status apache2.service</p>
<p>&gt;journalctl -xe</p>
</blockquote>
<p>if apache was installed correctly and is running go with your browser to <span class="nolink">http://localhost</span> you should see the Apache webserver page</p>
<p>------------</p>
<p>To enable or disable the automatic start of Apache2 service when you boot your machine use</p>
<blockquote>
<p>&gt;systemctl enable apache2.service</p>
<p>&gt;systemctl disable apache2.service</p>
</blockquote>
<p>
<br/>
</p>
<p>To start or stop manually the Apache2 service use</p>
<blockquote>
<p>&gt;systemctl start apache2.service</p>
<p>&gt;systemctl stop apache2.service</p>
&gt;systemctl status apache2.service<br/>
&gt;journalctl -xe
</blockquote>
<p>if apache was installed correctly and is running go with your browser to http://localhost you should see the Apache webserver page</p>
<p>For more information see [[Apache tips]]</p>
<p>------------</p>
<h3>Setup Apache to run your website</h3>
<p>at /etc/apache2/sites-available/ create the file tracks.conf</p>