ruby - mastodon setup guide 安装说明

访问量: 30

refer to: https://docs.joinmastodon.org/admin/install/

各种配置

ubuntu 20

apt install -y curl wget gnupg apt-transport-https lsb-release ca-certificates

node 16

yarn   , 

corepack enable

postgres 14

sudo 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 libgdbm-dev nginx redis-server redis-tools postgresql postgresql-contrib certbot python3-certbot-nginx libidn11-dev libicu-dev libjemalloc-dev

ruby 3.0.3

git clone https://github.com/mastodon/mastodon.git

cd mastodon

git checkout v3.5.3

bundle install --verbose

配置:

RAILS_ENV=production bundle exec rake mastodon:setup

(会生成文件: .env.production ) 需要提前把 postgres, redis, smtp 准备好。

bundle exec rake db:create

bundle exec rake db:migrate

bundle exec rake assets:precompile

运行 (也可以直接使用puma.rb 配置文件 )

RAILS_ENV=production bundle exec rails s -p 3355 -b 0.0.0.0 

启动sidekiq:

setsid nohup bundle exec sidekiq -C config/sidekiq.yml -e development &

注册

直接注册即可

使用

一定要运行在production模式下,否则会找不到websocket

订阅/RSS Feed

Subscribe