Posts Tagged ‘mastodon’
The official Mastodon installation guides are all made for Debian-based distros, so here’s a handy production-ready install for CentOS/RHEL (based on nginx):
- Enable the NUX repo, so that we can install ffmpeg:
- sudo rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
- sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
- Use yum to install these packages: ImageMagick libpqxx-devel libxml2-devel libxslt-devel nodejs ffmpeg file git curl postgresql postgresql-contrib postgresql-server redis gcc gcc-c++ bzip2 openssl-devel readline-devel
- sudo npm install -g yarn
- Create a user to run the app:
- sudo useradd -d /home/mastodon -m -s /bin/bash -U mastodon
- Configure Postgres to start at boot and start the service:
- sudo systemctl enable postgresql
- sudo postgresql-setup initdb
- sudo systemctl start postgresql
- Create a PGSQL database user:
- sudo su – postgres; psql
- CREATE USER mastodon CREATEDB;
- \q
- Follow the guides to install rbenv and rbenv-build for the mastodon user
- Once rbenv is ready, run `rbenv install 2.3.1` as the mastodon user
- Install mastodon (sudo as mastodon user):
- cd ~
git clone https://github.com/tootsuite/mastodon.git live
cd live
gem install bundler
bundle install –deployment –without development test
yarn install
- cd ~
- Follow the rest of the guide for configuration at Mastodon’s repo, starting from the “Configuration” step
- Disable the user mastodon from logging in:
- sudo chsh -s /sbin/nologin mastodon
Tags: centos, mastodon, social media