myhelp:mastodon
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| myhelp:mastodon [2024/03/20 10:10] – ulrich | myhelp:mastodon [2024/03/20 10:16] (current) – [Setting up systemd services] ulrich | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| I used the instructions from [[https:// | I used the instructions from [[https:// | ||
| - | ====== Install Mastodon on Rocky Linux 8 ====== | + | ====== Install Mastodon on Rocky Linux 9 ====== |
| ===== Pre-requisites ===== | ===== Pre-requisites ===== | ||
| Enable EPEL is a good idea | Enable EPEL is a good idea | ||
| Line 12: | Line 12: | ||
| < | < | ||
| curl --silent --location https:// | curl --silent --location https:// | ||
| - | </ | ||
| - | |||
| - | After a fresh installation, | ||
| - | < | ||
| - | yum module enable ruby:3.0 -y | ||
| - | yum module enable nodejs:12 -y | ||
| - | yum module enable postgresql: | ||
| </ | </ | ||
| Line 26: | Line 19: | ||
| | | ||
| | | ||
| - | | + | |
| | | ||
| - | | + | |
| | | ||
| </ | </ | ||
| Line 38: | Line 31: | ||
| usermod -d / | usermod -d / | ||
| </ | </ | ||
| + | |||
| + | Start redis | ||
| + | < | ||
| ===== Preparing the DB ===== | ===== Preparing the DB ===== | ||
| Line 73: | Line 69: | ||
| RAILS_ENV=production bundle exec rake mastodon: | RAILS_ENV=production bundle exec rake mastodon: | ||
| </ | </ | ||
| + | |||
| ===== Setting up nginx ===== | ===== Setting up nginx ===== | ||
| Line 103: | Line 100: | ||
| < | < | ||
| sed -i ' | sed -i ' | ||
| - | sed -i ' | + | sed -i ' |
| </ | </ | ||
| Line 112: | Line 109: | ||
| </ | </ | ||
| - | ====== Update Mastodon to 4.0.* ====== | ||
| - | That is just a how-to which worked for me. Do a Backup in advance! | ||
| - | ===== Pre-requisites ===== | ||
| - | Backup everything! You do not want to stay up half of the night and fix something. | ||
| - | With the update to the version 4.0 you need a nodejs 14 and also edit some path in the system files. | + | Maybe something went wrong with the install of the bundler gem and the services are not starting. Check if the gem is installed or just install it. |
| - | Update nodejs: | + | |
| < | < | ||
| - | yum module reset nodejs | + | # su - mastodon |
| - | yum module enable nodejs:14 | + | cd live/ |
| - | yum -y update | + | RAILS_ENV=production |
| </ | </ | ||
| - | Edit the path for bundle: | ||
| - | < | ||
| - | sed -i ' | ||
| - | </ | ||
| - | That is necessary, because in my installation I changed it before. | ||
| - | ===== the REAL update ===== | ||
| - | Here I just followed the manual from [[https:// | ||
| - | This can take some minutes: | ||
| - | < | ||
| - | su - mastodon | ||
| - | cd live | ||
| - | git fetch && git checkout v4.0.0 | ||
| - | bundle install | ||
| - | yarn install | ||
| - | </ | ||
| - | |||
| - | Also this take some minutes | ||
| - | < | ||
| - | SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate | ||
| - | RAILS_ENV=production bundle exec rails assets: | ||
| - | sudo systemctl restart mastodon-* | ||
| - | RAILS_ENV=production bundle exec rails db:migrate | ||
| - | sudo systemctl restart mastodon-* | ||
| - | </ | ||
| - | |||
| - | |||
| - | ===== Update to 4.0.2 ===== | ||
| - | < | ||
| - | su - mastodon | ||
| - | cd live | ||
| - | git fetch && git checkout v4.0.2 | ||
| - | bundle install | ||
| - | RAILS_ENV=production bundle exec rails assets: | ||
| - | sudo systemctl restart mastodon-* | ||
| - | </ | ||
| - | YEAH! Welcome to the new version. | ||
| ====== Tuning ====== | ====== Tuning ====== | ||
| Line 166: | Line 122: | ||
| sidekiq is handling multiple queues. Each of them can run as an own process. Per process you should use a max. of 25 threads. | sidekiq is handling multiple queues. Each of them can run as an own process. Per process you should use a max. of 25 threads. | ||
| - | I used the instructions from [[https:// | + | ====== OLD HOW TO ====== |
| - | + | ===== Install Mastodon on Rocky Linux 8 ===== | |
| - | ====== Install Mastodon on Rocky Linux 9 ====== | + | ==== Pre-requisites ==== |
| - | ===== Pre-requisites | + | |
| Enable EPEL is a good idea | Enable EPEL is a good idea | ||
| < | < | ||
| Line 179: | Line 134: | ||
| < | < | ||
| curl --silent --location https:// | curl --silent --location https:// | ||
| + | </ | ||
| + | |||
| + | After a fresh installation, | ||
| + | < | ||
| + | yum module enable ruby:3.0 -y | ||
| + | yum module enable nodejs:12 -y | ||
| + | yum module enable postgresql: | ||
| </ | </ | ||
| Line 186: | Line 148: | ||
| | | ||
| | | ||
| - | | + | |
| | | ||
| - | | + | |
| | | ||
| </ | </ | ||
| Line 199: | Line 161: | ||
| </ | </ | ||
| - | Start redis | + | ==== Preparing the DB ==== |
| - | < | + | |
| - | + | ||
| - | ===== Preparing the DB ===== | + | |
| < | < | ||
| systemctl start postgresql.service | systemctl start postgresql.service | ||
| Line 213: | Line 172: | ||
| </ | </ | ||
| - | ===== Setting up Mastodon | + | ==== Setting up Mastodon ==== |
| < | < | ||
| su - mastodon | su - mastodon | ||
| Line 237: | Line 196: | ||
| </ | </ | ||
| - | + | ==== Setting up nginx ==== | |
| - | ===== Setting up nginx ===== | + | |
| Copy the prepared nginx.conf into the nginxc config-dir. Change the hostname and the root-dir. | Copy the prepared nginx.conf into the nginxc config-dir. Change the hostname and the root-dir. | ||
| < | < | ||
| Line 258: | Line 216: | ||
| </ | </ | ||
| - | ===== Setting up systemd services | + | ==== Setting up systemd services ==== |
| copy the files | copy the files | ||
| < | < | ||
| Line 267: | Line 225: | ||
| < | < | ||
| sed -i ' | sed -i ' | ||
| - | sed -i ' | + | sed -i ' |
| </ | </ | ||
| Line 277: | Line 235: | ||
| - | Maybe something went wrong with the install of the bundler gem ?!?! | + | ===== Update Mastodon to 4.0.* ===== |
| - | < | + | |
| - | # su - mastodon | + | |
| - | cd live/ | + | |
| - | RAILS_ENV=production | + | |
| - | </ | + | |
| - | + | ||
| - | ====== Update Mastodon to 4.0.* ====== | + | |
| That is just a how-to which worked for me. Do a Backup in advance! | That is just a how-to which worked for me. Do a Backup in advance! | ||
| - | ===== Pre-requisites | + | ==== Pre-requisites ==== |
| Backup everything! You do not want to stay up half of the night and fix something. | Backup everything! You do not want to stay up half of the night and fix something. | ||
| Line 301: | Line 252: | ||
| </ | </ | ||
| That is necessary, because in my installation I changed it before. | That is necessary, because in my installation I changed it before. | ||
| - | ===== the REAL update | + | ==== the REAL update ==== |
| Here I just followed the manual from [[https:// | Here I just followed the manual from [[https:// | ||
| Line 323: | Line 274: | ||
| - | ===== Update to 4.0.2 ===== | + | ==== Update to 4.0.2 ==== |
| < | < | ||
| su - mastodon | su - mastodon | ||
| Line 334: | Line 285: | ||
| YEAH! Welcome to the new version. | YEAH! Welcome to the new version. | ||
| - | ====== Tuning | + | ===== Tuning ===== |
| - | ===== Start tuning sidekiq | + | ==== Start tuning sidekiq ==== |
| sidekiq is handling multiple queues. Each of them can run as an own process. Per process you should use a max. of 25 threads. | sidekiq is handling multiple queues. Each of them can run as an own process. Per process you should use a max. of 25 threads. | ||
| {{tag> | {{tag> | ||
myhelp/mastodon.1710929446.txt.gz · Last modified: by ulrich
