User Tools

Site Tools


mastodon_on_18.04_step-by-step

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mastodon_on_18.04_step-by-step [2019/10/31 13:09] (current)
admin created
Line 1: Line 1:
 +<​code>​ 
 +sudo apt update 
 +sudo apt upgrade 
 +sudo apt install fail2ban 
 +sudo systemctl restart fail2ban 
 +sudo -i 
 +apt install -y curl 
 +curl -sL https://​deb.nodesource.com/​setup_8.x | bash - 
 +curl -sS https://​dl.yarnpkg.com/​debian/​pubkey.gpg | apt-key add - 
 +echo "deb https://​dl.yarnpkg.com/​debian/​ stable main" | tee /​etc/​apt/​sources.list.d/​yarn.list 
 +apt update 
 +apt install -y \ 
 +  imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core \ 
 +  g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf \ 
 +  bison build-essential libssl-dev libyaml-dev libreadline6-dev \ 
 +  zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev \ 
 +  nginx redis-server redis-tools postgresql postgresql-contrib \ 
 +  certbot python-certbot-nginx yarn libidn11-dev libicu-dev libjemalloc-dev 
 +apt install sendmail 
 +adduser --disabled-login mastodon 
 +su - mastodon 
 +git clone https://​github.com/​rbenv/​rbenv.git ~/.rbenv 
 +cd ~/.rbenv && src/​configure && make -C src 
 +echo '​export PATH="​$HOME/​.rbenv/​bin:​$PATH"'​ >> ~/.bashrc 
 +echo 'eval "​$(rbenv init -)"'​ >> ~/.bashrc 
 +exec bash 
 +git clone https://​github.com/​rbenv/​ruby-build.git ~/​.rbenv/​plugins/​ruby-build 
 +RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.1 
 +rbenv global 2.6.1 
 +gem update --system 
 +gem install bundler --no-document 
 +exit 
 +sudo -u postgres psql 
 +CREATE USER mastodon CREATEDB; 
 +\q 
 +su - mastodon 
 +git clone https://​github.com/​tootsuite/​mastodon.git live && cd live 
 +git checkout $(git tag -l | grep -v '​rc[0-9]*$'​ | sort -V | tail -n 1) 
 +bundle install \ 
 +  -j$(getconf _NPROCESSORS_ONLN) \ 
 +  --deployment --without development test 
 +RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.5 
 +rbenv global 2.6.5 
 +gem update --system 
 +git checkout $(git tag -l | grep -v '​rc[0-9]*$'​ | sort -V | tail -n 1) 
 +bundle install \ 
 +  -j$(getconf _NPROCESSORS_ONLN) \ 
 +  --deployment --without development test 
 +yarn install --pure-lockfile 
 +RAILS_ENV=production bundle exec rake mastodon:​setup 
 +exit 
 +cp /​home/​mastodon/​live/​dist/​nginx.conf /​etc/​nginx/​sites-available/​mastodon 
 +ln -s /​etc/​nginx/​sites-available/​mastodon /​etc/​nginx/​sites-enabled/​mastodon 
 +systemctl reload nginx 
 +certbot --nginx -d socialanimal.co.uk 
 +cp /​home/​mastodon/​live/​dist/​mastodon-*.service /​etc/​systemd/​system/​ 
 +systemctl start mastodon-web mastodon-sidekiq mastodon-streaming 
 +systemctl enable mastodon-web.service 
 +systemctl enable mastodon-sidekiq.service 
 +systemctl enable mastodon-streaming.service 
 +</​code>​
mastodon_on_18.04_step-by-step.txt · Last modified: 2019/10/31 13:09 by admin