mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 09:24:22 +01:00
Created Update already installed Tracks on Ubuntu 21.04 (markdown)
parent
7532da945d
commit
851787ca9c
1 changed files with 83 additions and 0 deletions
83
Update-already-installed-Tracks-on-Ubuntu-21.04.md
Normal file
83
Update-already-installed-Tracks-on-Ubuntu-21.04.md
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<p>This is a complement of the installation guide [[Install Tracks 2.5 on Ubuntu 20.10]]</p>
|
||||
<p>
|
||||
<br/>
|
||||
</p>
|
||||
<p>it is not the best practice... but normally I do</p>
|
||||
<blockquote>
|
||||
<p>>sudo -i</p>
|
||||
</blockquote>
|
||||
<p>at the beginning to avoid all the sudos during the update</p>
|
||||
<h3>Stop Apache and MySQL service</h3>
|
||||
<blockquote>
|
||||
<p>>systemctl stop mysql.service</p>
|
||||
<p>>systemctl stop apache2</p>
|
||||
</blockquote>
|
||||
<h3>Move Gemfile </h3>
|
||||
<p>Move the files Gemfile and Gemfile.lock out of the /var/wwww/tracks directory</p>
|
||||
<p>Normally they are modified after the last "pull" (retrieval) of git so when you pull again git will inform a conflict due to the late modifications.</p>
|
||||
<h3>Update the files from the repository</h3>
|
||||
<blockquote>
|
||||
<p>>cd /var/www</p>
|
||||
<p>>git pull</p>
|
||||
</blockquote>
|
||||
<h3>Check the parameter files</h3>
|
||||
<p>compare the configuration file database.yml.tmpl with yours database.yml</p>
|
||||
<p>compare the configuration file site.yml.tmpl with yours site.yml</p>
|
||||
|
||||
<h3>Update the Ruby libraries known as ‘gems’</h3>
|
||||
<blockquote>
|
||||
>cd /var/www/tracks<br/>
|
||||
>bundle update
|
||||
</blockquote>
|
||||
<p>you can also use</p>
|
||||
<blockquote>
|
||||
>bundle install
|
||||
</blockquote>
|
||||
|
||||
<h3>Adjust owner and owner group for the downloaded files</h3>
|
||||
<p>All the files should be owned by the user ''www-data'' which is the user that runs Apache.</p>
|
||||
<p>To set the owner and the owner group of all the files to www-data, at /var/www execute</p>
|
||||
<blockquote>
|
||||
>chown -R www-data:www-data <strong>tracks</strong>
|
||||
</blockquote>
|
||||
<p>then you need to set the access rights, the simplest way is at /var/www execute</p>
|
||||
<blockquote>
|
||||
>chmod -R 777 <strong>tracks</strong>
|
||||
</blockquote>
|
||||
<p>later once you have all running you can correctly set</p>
|
||||
<blockquote>
|
||||
> find /var/www/tracks -type d -exec chmod 700 '{}' \;<br/>
|
||||
> find /var/www/tracks -type f -exec chmod 600 '{}' \;<br/>
|
||||
> find /var/www/tracks/script -type f -exec chmod 700 '{}' \;
|
||||
</blockquote>
|
||||
<p>The ''find'' and ''chmod'' commands will set permissions as ''700'' for all directories and files inside the ''script'' directory.</p>
|
||||
<p>All other files will have permissions set to ''600''.</p>
|
||||
|
||||
<h3>Start MySQL service</h3>
|
||||
<blockquote>
|
||||
<p>>systemctl start mysql.service</p>
|
||||
</blockquote>
|
||||
|
||||
<h3>Update database</h3>
|
||||
<blockquote>
|
||||
>cd /var/www/tracks<br/>
|
||||
<s>>rake --rakefile=/var/www/tracks/Rakefile db:migrate RAILS_ENV=production</s><br/>
|
||||
>bundle exec rake db:migrate RAILS_ENV=production
|
||||
</blockquote>
|
||||
<p>If you get the error : "ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime", that means that yourJavaScript runtime has lost its magic or you don't have a JavaScript runtime installed.</p>
|
||||
<p>When we installed "libapache2-mod-passenger" it suggested to install "nodejs"; so just install (or re-install) it."</p>
|
||||
<blockquote>
|
||||
>apt install nodejs
|
||||
</blockquote>
|
||||
|
||||
<h3>Precompile assets</h3>
|
||||
<blockquote>
|
||||
>cd /var/www/tracks<br/>
|
||||
<s>>rake --rakefile=/var/www/tracks/Rakefile assets:precompile RAILS_ENV=production</s><br/>
|
||||
>bundle exec rake assets:precompile RAILS_ENV=production
|
||||
</blockquote>
|
||||
|
||||
<h3>Start Apache service</h3>
|
||||
<blockquote>
|
||||
<p>>systemctl start apache2</p>
|
||||
</blockquote>
|
||||
Loading…
Add table
Add a link
Reference in a new issue