MastodonソスCソスソスソスXソス^ソスソスソスXソス\ソスzソスiMastodonソスj

ソスナ終ソスXソスVソスソスソスF 2019.06.17

ソスソスソスTソスv

MastodonソスソスTwitterソスフようソスソスSNSソスTソス[ソスrソスXソスソスソスソスソスソスTソス[ソスoソス[ソスナ行ソスソスソスソス謔、ソスノゑソスソスソスB
ソスネゑソスソスAMastodonソスナは、ソスTソス[ソスrソスXソスソス供ゑソスソスソスTソス[ソスoソス[ソスソスソスuソスCソスソスソスXソス^ソスソスソスXソスvソスニ呼ぶ。

ソスソスApacheソス{ソステ搾ソスソスソスソスハ信ソスソスソスソスソスソスソスマでゑソスソス驍アソスソス
ソスソスソスKソスvソスnソス[ソスhソスXソスyソスbソスN



ソスソスMastodonソスzソスXソスgソスソスソスン抵ソス

ソスoソス[ソス`ソスソスソスソスソスzソスXソスgソスン抵ソスソスソスソスQソスニゑソスソスト、MastodonソスCソスソスソスXソス^ソスソスソスXソスヨホソスXソスgソスソスmstdn.centossrv.comソスナアソスNソスZソスXソスナゑソスソスソス謔、ソスノ設定すソスソスB

ソスiソスoソス[ソス`ソスソスソスソスソスzソスXソスgソスン抵ソスソスソスソスソスj
ソスzソスXソスgソスソス mstdn.centossrv.com
ソスhソスLソスソスソスソスソスソスソスgソスソスソス[ソスg /var/www/html/mstdn.centossrv.com

ソスソスSparkPostソスoソス^ソスソスソスソスソス[ソスソスソスTソス[ソスoソス[ソス\ソスzソスマの場合ソスヘ不ソスv

SparkPostソスTソス[ソスrソスXソス利用ソスソスソスト、ソスソスソス[ソスUソス[ソスoソス^ソスソスソスフソスソス[ソスソスソスAソスhソスソスソスXソスmソスFソスソスソス[ソスソスソス送信ソスナゑソスソスソス謔、ソスノゑソスソスソスB
ソスソスSparkPostソスナゑソス5000ソスハ/ソスソスソスA100000ソスハ/ソスソスソスフソスソス[ソスソスソス送信ソスソスソスソスソスソスソスhソスソスソスCソスソスソスソスソスフソスソス[ソスソスソスAソスhソスソスソスXソスニゑソスソスト托ソスソスMソスソスソス驍アソスニゑソスソスナゑソスソスソス

ソスネゑソスソスAソスhソスソスソスCソスソスソスFソスリゑソスソス驍スソス゚、ソスソスソス轤ゥソスソスソスソス[email protected]ソスワゑソスソスソス[email protected]ソスソスソスソスソス[ソスソスソスソスソスソスMソスナゑソスソスソス謔、ソスノゑソスソストゑソスソスソスソスソスソスニ。ソスソスソスfソスtソスHソスソスソスgソスソス[email protected]ソスワゑソスソスソス[email protected]ソスソスソスソスソス[ソスソスソスソスrootソスソスソス[ソスUソス[ソスノ転ソスソスソスソスソスソスソス謔、ソスノなゑソスソストゑソスソスソスフで、rootソスソスソス[ソスUソス[ソスソスソスソスソス[ソスソスソスソスソスソスMソスナゑソスソスソス謔、ソスノゑソスソストゑソスソスソスソスソスCentOSソスソスソスソスソスン抵ソスフ「rootソスソスソスソスソス[ソスソスソスソス]ソスソスソスソスソスソスvソスソスソスQソスソス
  • SparkPostソスソスSIGN UPソスiソスソスソス[ソスUソス[ソスoソス^ソスjソスソスソスソスム托ソスソスMソスソスソスソスソス[ソスソスソスフドソスソスソスCソスソスソスソスン定すソスソスB
  • ソスhソスソスソスCソスソスソスン抵ソスソスAソスuSMTP Setupソスvソスナ表ソスソスソスソスソス黷スPasswordソスソスソスTソスソスソスソスBソスソスソスソスxソスソスソスソスソス\ソスソスソスソスソスソスネゑソスソスフで抵ソスソスモ⇒包ソスソスソスソスソスソスソスソス鼾ソスヘ、SparkPostソスノソスソスOソスCソスソスソスソスAACCOUNTソスソスAPI KEYSソスソスNEW API KEYソスソスAPI KEYソスソスVソスソスソスノ撰ソスソスソスソスソスソスソスソスソス
  • ソスソスソス[ソスUソス[ソスoソス^ソスソスソスソスソスソスソス[ソスソスソスAソスhソスソスソスXソスソスソスノ托ソスソスソスソストゑソスソスソスソスソスソス[ソスソスソスソスソスフソスソスソスソスNソスソスソスNソスソスソスbソスNソスソスソストソスソス[ソスソスソスAソスhソスソスソスXソスmソスFソスソスソスsソスソスソスB
  • [email protected]ソスワゑソスソスソス[email protected]ソスソスソスノ托ソスソスソスソストゑソスソスソスソスソスソス[ソスソスソスソスソスフソスソスソスソスNソスソスソスNソスソスソスbソスNソスソスソストドソスソスソスCソスソスソスmソスFソスソスソスsソスソスソスB

ソスソスMastodonソスCソスソスソスXソスgソス[ソスソス

ソスiソスPソスjMastodonソスCソスソスソスXソスgソス[ソスソスソスソスソスソス
[root@centos ~]# yum -y install libxml2-devel ImageMagick libxslt-devel git curl file g++ protobuf-compiler protobuf-devel readline-devel libicu-devel libidn-develソス@ソスソスソス@MastodonソスCソスソスソスXソスgソス[ソスソスソスノ必ソスvソスネパソスbソスPソス[ソスWソスソスソスCソスソスソスXソスgソス[ソスソス

EPELソスソスソス|ソスWソスgソスソスソスソスソスソス(EPEL)ソスソスソスQソスニゑソスソスソスEPELソスソスソス|ソスWソスgソスソスソス導難ソスソスソスソスソス

[root@centos ~]# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpmソス@ソスソスソス@nux-dextopソスソスソス|ソスWソスgソスソスソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# yum -y install ffmpeg ffmpeg-develソス@ソスソスソス@ffmpegソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# curl -sL https://rpm.nodesource.com/setup_6.x | bash -ソス@ソスソスソス@Node.jsソスソスソス|ソスWソスgソスソスソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# yum -y install nodejsソス@ソスソスソス@nodejsソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repoソス@ソスソスソス@Yarnソスソスソス|ソスWソスgソスソスソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# yum -y install yarnソス@ソスソスソス@yarnソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# useradd mastodonソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソス成

ソスiソスQソスjRedisソスソスソスソス
[root@centos ~]# yum -y install redis rubygem-redisソス@ソスソスソス@RedisソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# systemctl start redisソス@ソスソスソス@RedisソスNソスソス

[root@centos ~]# systemctl enable redisソス@ソスソスソス@RedisソスソスソスソスソスNソスソスソスン抵ソス

[root@centos ~]# mv /opt/nessus/lib/nessus/plugins/redis_password_protection_disabled.nasl /opt/nessus/lib/nessus/plugins/redis_password_protection_disabled.nasl.orgソス@ソスソスソス@NessusソスノゑソスソスuRedis Server Unprotected by Password Authenticationソスvソスソスソスmソスホ会ソスソスソスNessusソスソスソスソスソスソスソスフゑソス

ソスiソスRソスjPostgresソスソスソスソス
[root@centos ~]# yum -y install postgresql-server postgresql postgresql-contrib postgresql-develソス@ソスソスソス@PostgresソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# postgresql-setup initdbソス@ソスソスソス@ソスfソス[ソス^ソスxソス[ソスXソスソスソスソスソスン抵ソス
Initializing database ... OK

[root@centos ~]# systemctl start postgresqlソス@ソスソスソス@PostgresソスNソスソス

[root@centos ~]# systemctl enable postgresqlソス@ソスソスソス@PostgresソスソスソスソスソスNソスソスソスン抵ソス

[root@centos ~]# sudo -u postgres psqlソス@ソスソスソス@Postgresソスヌ暦ソスソスメソスソス[ソスUソス[ソスソスpsqlソスソスソスs
could not change directory to "/root"
psql (9.2.18)
Type "help" for help.

postgres=# CREATE USER mastodon CREATEDB;ソス@ソスソスソス@Postgresソスソスmastodonソスソスソス[ソスUソス[ソス成
CREATE ROLE
postgres-# \qソス@ソスソスソス@psqlソスIソスソス

ソスiソスSソスjRbenvソスソスソスソス
[root@centos ~]# su - mastodonソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソスヨ切托ソス

[mastodon@centos ~]$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenvソス@ソスソスソス@Rbenvソス_ソスEソスソスソスソスソス[ソスh

[mastodon@centos ~]$ cd ~/.rbenv && src/configure && make -C src && cd ~ソス@ソスソスソス@RbenvソスCソスソスソスXソスgソス[ソスソス

[mastodon@centos ~]$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profileソス@ソスソスソス@Rbenvソスツ具ソスソスン抵ソス

[mastodon@centos ~]$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profileソス@ソスソスソス@Rbenvソスツ具ソスソスン抵ソス

[mastodon@centos ~]$ source ~/.bash_profileソス@ソスソスソス@Rbenvソスツ具ソスソスン定反ソスf

ソスiソスTソスjRubyソスソスソスソス
[mastodon@centos ~]$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-buildソス@ソスソスソス@Rubyソス_ソスEソスソスソスソスソス[ソスh

[mastodon@centos ~]$ rbenv install 2.5.1 && rbenv global $_ && rbenv rehashソス@ソスソスソス@RubyソスCソスソスソスXソスgソス[ソスソス
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス

ソスiソスUソスjMastodonソスCソスソスソスXソスgソス[ソスソス
[mastodon@centos ~]$ git clone https://github.com/tootsuite/mastodon.git liveソス@ソスソスソス@Mastodonソス_ソスEソスソスソスソスソス[ソスh

[mastodon@centos ~]$ cd liveソス@ソスソスソス@Mastodonソス_ソスEソスソスソスソスソス[ソスhソスソスfソスBソスソスソスNソスgソスソスソスヨ移難ソス

[mastodon@centos live]$ git checkout $(git tag | grep -v rc | tail -n 1)ソス@ソスソスソス@Mastodonソスナ新ソスソスソスソスツ(RCソスナゑソスソスソスソスソスソスjソス_ソスEソスソスソスソスソス[ソスh

[mastodon@centos live]$ gem install bundlerソス@ソスソスソス@bundlerソスCソスソスソスXソスgソス[ソスソス

[mastodon@centos live]$ bundle install --deployment --without development test
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス

[mastodon@centos live]$ yarn install --pure-lockfile
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス

[mastodon@centos live]$ cp .env.production.sample .env.productionソス@ソスソスソス@ソスTソスソスソスvソスソスソスソスソスRソスsソス[ソスソスソスソス.env.productionソスソスソス成

[mastodon@centos live]$ RAILS_ENV=production bundle exec rake secretソス@ソスソスソス@ソス髢ァソスソスソスソスソスソスソスi1ソスツ目)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ソスソスソスソスナ使ソスpソスソスソス驍スソス゚出ソスヘ鯉ソスソスハゑソスソスTソスソスソストゑソスソスソス

[mastodon@centos live]$ RAILS_ENV=production bundle exec rake secretソス@ソスソスソス@ソス髢ァソスソスソスソスソスソスソスi2ソスツ目)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ソスソスソスソスナ使ソスpソスソスソス驍スソス゚出ソスヘ鯉ソスソスハゑソスソスTソスソスソストゑソスソスソス

[mastodon@centos live]$ RAILS_ENV=production bundle exec rake secretソス@ソスソスソス@ソス髢ァソスソスソスソスソスソスソスi3ソスツ目)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ソスソスソスソスナ使ソスpソスソスソス驍スソス゚出ソスヘ鯉ソスソスハゑソスソスTソスソスソストゑソスソスソス

[mastodon@centos live]$ RAILS_ENV=production bundle exec rake mastodon:webpush:generate_vapid_keyソス@ソスソスソス@WebソスvソスbソスVソスソスソスハ知ソスpソスソスソスソスソスソス
VAPID_PRIVATE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
VAPID_PUBLIC_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ソスソスソスソスナ使ソスpソスソスソス驍スソス゚出ソスヘ鯉ソスソスハゑソスソスTソスソスソストゑソスソスソス

[root@centos mastodon]# vi .env.productionソス@ソスソスソス@.env.productionソスtソス@ソスCソスソスソスメ集
# Service dependencies
# You may set REDIS_URL instead for more advanced options
REDIS_HOST=localhostソス@ソスソスソス@RedisソスzソスXソスgソスソスソスノ趣ソスソスzソスXソスgソスソスソスwソスソス
REDIS_PORT=6379
# You may set DATABASE_URL instead for more advanced options
DB_HOST=ソス@ソスソスソス@PotgressソスzソスXソスgソスソスソス除
DB_USER=mastodonソス@ソスソスソス@ソスfソス[ソス^ソスxソス[ソスXソスソスソス[ソスUソス[ソスソスソスwソスソス
DB_NAME=mastodonソス@ソスソスソス@ソスfソス[ソス^ソスxソス[ソスXソスソスソスwソスソス
DB_PASS=
DB_PORT=5432

# Federation
LOCAL_DOMAIN=mstdn.centossrv.comソス@ソスソスソス@ソスzソスXソスgソスソスソスソスソスwソスソス
LOCAL_HTTPS=trueソス@ソスソスソス@ソステ搾ソスソスソスソスハ信ソスLソスソスソスソス

# Application secrets
# Generate each with the `rake secret` task (`docker-compose run --rm web rake secret` if you use docker compose)
PAPERCLIP_SECRET=xxxxソスEソスEソスExxxxソス@ソスソスソス@ソスソスソスソスソスソスソスソスソス髢ァソスソスソスi1ソスツ目)ソスソスソスwソスソス
SECRET_KEY_BASE=xxxxソスEソスEソスExxxxソス@ソスソスソス@ソスソスソスソスソスソスソスソスソス髢ァソスソスソスi2ソスツ目)ソスソスソスwソスソス
OTP_SECRET=xxxxソスEソスEソスExxxxソス@ソスソスソス@ソスソスソスソスソスソスソスソスソス髢ァソスソスソスi3ソスツ目)ソスソスソスwソスソス

# VAPID keys (used for push notifications
# You can generate the keys using the following command (first is the private key, second is the public one)
# You should only generate this once per instance. If you later decide to change it, all push subscription will
# be invalidated, requiring the users to access the website again to resubscribe.
#
# Generate with `rake mastodon:webpush:generate_vapid_key` task (`docker-compose run --rm web rake mastodon:webpush:generate_vapid_key` if you use docker compose)
#
# For more information visit https://rossta.net/blog/using-the-web-push-api-with-vapid.html
VAPID_PRIVATE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxソス@ソスソスソス@ソスソスソスソスソスソスソスソスWebソスvソスbソスVソスソスソスハ知ソスpソスソスソスソスソスwソスソス
VAPID_PUBLIC_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxソス@ソスソスソス@ソスソスソスソスソスソスソスソスWebソスvソスbソスVソスソスソスハ知ソスpソスソスソスソスソスwソスソス

ソスソスソス[ソスソスソスン抵ソスiSparkPostソスソスソス辜ソス[ソスソスソスソスソスMソスソスソスソス鼾ソスj
# E-mail configuration
# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
# If you want to use an SMTP server without authentication (e.g local Postfix relay)
# then set SMTP_AUTH_METHOD to 'none' and *comment* SMTP_LOGIN and SMTP_PASSWORD.
# Leaving them blank is not enough for authentication method 'none'.
SMTP_SERVER=smtp.sparkpostmail.comソス@ソスソスソス@SparkPostソスソスSMTPソスTソス[ソスoソス[ソスソスソスソスソスwソスソス
SMTP_PORT=587
SMTP_LOGIN=SMTP_Injectionソス@ソスソスソス@SMTP_Injectionソスソスソスwソスソス
SMTP_PASSWORD=xxxxxxxxソス@ソスソスソス@SparkPostソスoソス^ソスソスソスノ取得ソスソスソスソスAPI KEYソスソスソスwソスソス
[email protected]ソス@ソスソスソス@MastodonソスCソスソスソスXソス^ソスソスソスXソスソスソスソスフソスソス[ソスソスソスソスソスMソスソスソスAソスhソスソスソスXソスソスソスwソスソス
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
#SMTP_AUTH_METHOD=plain
#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
#SMTP_OPENSSL_VERIFY_MODE=peer
#SMTP_ENABLE_STARTTLS_AUTO=true

ソスソスソス[ソスソスソスン抵ソスiソスソスソスソスソス[ソスソスソスTソス[ソスoソス[ソスソスソス辜ソス[ソスソスソスソスソスMソスソスソスソス鼾ソスj
# E-mail configuration
# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
# If you want to use an SMTP server without authentication (e.g local Postfix relay)
# then set SMTP_AUTH_METHOD to 'none' and *comment* SMTP_LOGIN and SMTP_PASSWORD.
# Leaving them blank is not enough for authentication method 'none'.
SMTP_SERVER=127.0.0.1ソス@ソスソスソス@ソスソスソス[ソスソスソスTソス[ソスoソス[ソスソスIPソスAソスhソスソスソスXソスソスソスwソスソス
SMTP_PORT=25ソス@ソスソスソス@ソス|ソス[ソスgソスヤ搾ソス25ソスソスソスwソスソス
SMTP_LOGIN=
SMTP_PASSWORD=
[email protected]ソス@ソスソスソス@MastodonソスCソスソスソスXソス^ソスソスソスXソスソスソスソスフソスソス[ソスソスソスソスソスMソスソスソスAソスhソスソスソスXソスソスソスwソスソス
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
SMTP_AUTH_METHOD=noneソス@ソスソスソス@SMTPソスFソスリ厄ソスソスソスソスソス
#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
SMTP_OPENSSL_VERIFY_MODE=noneソス@ソスソスソス@ソステ搾ソスソスソスソスハ信ソスソスソスソスソスソス
#SMTP_ENABLE_STARTTLS_AUTO=true

[mastodon@centos live]$ RAILS_ENV=production bundle exec rails db:setupソス@ソスソスソス@DBソス\ソスz

[mastodon@centos live]$ RAILS_ENV=production bundle exec rails assets:precompileソス@ソスソスソス@ソスvソスソスソスRソスソスソスpソスCソスソス
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス

[mastodon@centos live]$ exitソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソスソスソス逕イソスソスソスソス

ソスソスMastodonソスNソスソス

[root@centos ~]# vi /etc/systemd/system/mastodon-web.serviceソス@ソスソスソス@mastodon-webソスNソスソスソスXソスNソスソスソスvソスgソス成
[Unit]
Description=mastodon-web
After=network.target

[Service]
Type=simple
User=mastodon
WorkingDirectory=/home/mastodon/live
Environment="RAILS_ENV=production"
Environment="RAILS_SERVE_STATIC_FILES=true"
Environment="PORT=3000"
ExecStart=/home/mastodon/.rbenv/shims/bundle exec puma -C config/puma.rb
TimeoutSec=15
Restart=always

[Install]
WantedBy=multi-user.target

[root@centos ~]# vi /etc/systemd/system/mastodon-sidekiq.serviceソス@ソスソスソス@mastodon-sidekiqソスNソスソスソスXソスNソスソスソスvソスgソス成
[Unit]
Description=mastodon-sidekiq
After=network.target

[Service]
Type=simple
User=mastodon
WorkingDirectory=/home/mastodon/live
Environment="RAILS_ENV=production"
Environment="DB_POOL=5"
ExecStart=/home/mastodon/.rbenv/shims/bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push
TimeoutSec=15
Restart=always

[Install]
WantedBy=multi-user.target

[root@centos ~]# vi /etc/systemd/system/mastodon-streaming.serviceソス@ソスソスソス@mastodon-streamingソスNソスソスソスXソスNソスソスソスvソスgソス成
[Unit]
Description=mastodon-streaming
After=network.target

[Service]
Type=simple
User=mastodon
WorkingDirectory=/home/mastodon/live
Environment="NODE_ENV=production"
Environment="PORT=4000"
ExecStart=/usr/bin/npm run start
TimeoutSec=15
Restart=always

[Install]
WantedBy=multi-user.target

[root@centos ~]# systemctl start mastodon-{web,sidekiq,streaming}ソス@ソスソスソス@mastodonソスNソスソス

[root@centos ~]# systemctl enable mastodon-{web,sidekiq,streaming}ソス@ソスソスソス@mastodonソスソスソスソスソスNソスソスソスン抵ソス

ソスソスApacheソスAソスgソスン抵ソス

MastodonソスCソスソスソスXソス^ソスソスソスXソスソスApacheソスoソスRソスナアソスNソスZソスXソスナゑソスソスソス謔、ソスノゑソスソスソスB

[root@centos ~]# vi /etc/httpd/conf.d/virtualhost-mstdn.centossrv.com.confソス@ソスソスソス@mstdn.centossrv.comソスpソスoソス[ソス`ソスソスソスソスソスzソスXソスgソスン抵ソスtソス@ソスCソスソスソスメ集
<VirtualHost *:80>
    ServerName mstdn.centossrv.com
    DocumentRoot /var/www/html/mstdn.centossrv.com
    ErrorLog logs/mstdn.centossrv.com-error_log
    CustomLog logs/mstdn.centossrv.com-access_log combined env=!no_log
    ソス|ソス|ソスヌ会ソスソスiソスソスソスソスソスソスソスソスjソス|ソス|
    # http->httpsソスヨソスソス_ソスCソスソスソスNソスgソスン抵ソス
    RewriteEngine on
    RewriteRule "^/.well-known/acme-challenge" "-" [END]
    RewriteRule "^/(.*)" "https://%{HTTP_HOST}/$1"
    ソス|ソス|ソスヌ会ソスソスiソスソスソスソスソスワで)ソス|ソス|
</VirtualHost>
<VirtualHost *:443>

DocumentRoot "/var/www/html/mstdn.centossrv.com"
ServerName mstdn.centossrv.com

ソス|ソス|ソスヌ会ソスソスiソスソスソスソスソスソスソスソスjソス|ソス|
# MastodonソスAソスgソスン抵ソス
RequestHeader set X-Forwarded-Proto "https"
ProxyPass /api/v1/streaming ws://localhost:4000
ProxyPass / http://localhost:3000/
ProxyPassReverse /api/v1/streaming ws://localhost:4000
ProxyPassReverse / http://localhost:3000/
ソス|ソス|ソスヌ会ソスソスiソスソスソスソスソスワで)ソス|ソス|

[root@centos ~]# systemctl reload httpdソス@ソスソスソス@Apacheソスン定反ソスf

ソスソスMastodonソスmソスF

ソスiソスPソスjMastodonソスmソスF
http://mstdn.centossrv.comソスノアソスNソスZソスXソスソスソスソスhttps://mstdn.centossrv.com/aboutソスノ転ソスソスソスソスソスソスAMastodonソスyソス[ソスWソスソスソス\ソスソスソスソスソスソス驍アソスニゑソスソスmソスFソスソスソスソスB
  • https://mstdn.centossrv.com/auth/sign_upソスノアソスNソスZソスXソスソスソスト管暦ソスソスメソスソス[ソスUソス[ソスソスoソス^ソスソスソスソスB
  • ソスoソス^ソスソスソス[ソスソスソスAソスhソスソスソスXソスソスソスノ托ソスソスソスソストゑソスソスソスソスソスソス[ソスソスソスフソスソスソスソスNソスソスソスNソスソスソスbソスNソスソスソストソスソス[ソスソスソスAソスhソスソスソスXソスmソスFソスソスソスsソスソスソスBソスソスソスソスソス[ソスソスソスソスソスMソスソスSparkPostソス利用ソスソスソストゑソスソスソス鼾ソスヘソスソス[ソスソスソスソスソスソスソスMソスソスソスソストゑソスソスソスワで趣ソスソスヤゑソスソスソスソスソスソスソス鼾ソスソスソスソスソスソス
  • ソスoソス^ソスソスソスソスソスヌ暦ソスソスメソスソス[ソスUソス[ソスノ管暦ソスソスメ鯉ソスソスソスソスソスtソス^ソスソスソスソスB
    [root@centos ~]# su - mastodonソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソスヨ切托ソス
    
    [mastodon@centos ~]$ cd live/ソス@ソスソスソス@MastodonソスCソスソスソスXソスgソス[ソスソスソスfソスBソスソスソスNソスgソスソスソスヨ移難ソス
    
    [mastodon@centos live]$ RAILS_ENV=production bundle exec rails mastodon:make_admin USERNAME=ソスヌ暦ソスソスメソスソス[ソスUソス[ソスソスソス@ソスソスソス@ソスoソス^ソスソスソスソスソスヌ暦ソスソスメソスソス[ソスUソス[ソスノ管暦ソスソスメ鯉ソスソスソスソスソスtソス^
    Congrats! xxxxxxxx is now an admin. \o/
    Navigate to https://mstdn.centossrv.com/admin/settings/edit to get started
    
    [mastodon@centos live]$ exitソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソスソスソス逕イソスソスソスソス
    
  • https://mstdn.centossrv.comソスノアソスNソスZソスXソスソスソスト管暦ソスソスメソスソス[ソスUソス[ソスナソスソスOソスCソスソスソスソスソスソスBソスソスIEソスソスソスニソスソスOソスCソスソスソスソスネにゑソスソス\ソスソスソスソスソスソスネゑソスソスsソス合ソスiソスHソスjソスソスソスソスソスソスフで、ChromeソスソスFirefoxソスソスソスソスソスフブソスソスソスEソスUソスソスソスgソスpソスソスソスソス
  • ソスuソスソスソスvソスヒ「ソスソスソス[ソスUソス[ソスン抵ソスvソスヒ「ソスヌ暦ソスソスvソスヒ「ソスTソスCソスgソスン抵ソスvソスナ各ソスソスソスレゑソスン定すソスソスB

ソスiソスQソスjiPhoneソスmソスF
ソス}ソスXソスgソスhソスソスソスAソスvソスソスソスuPawooソスv - pixiv Inc.ソスソスソスCソスソスソスXソスgソス[ソスソスソスソスソスト起ソスソスソスソスソスソスB



ソスuソスソスソスフイソスソスソスXソス^ソスソスソスXソスノ参ソスソスソスv


ソスCソスソスソスXソス^ソスソスソスXソスソスソスソスmstdn.centossrv.comソスニ難ソスソスヘゑソスソスト「ソスソスソスヨ」


ソスソスソス[ソスソスソスAソスhソスソスソスXソスニパソスXソスソスソス[ソスhソスソスソスソスヘゑソスソスト「ソスソスソスOソスCソスソスソスv


ソスuソスソスソスFソスv


ソスソスMastodonソス^ソスp

ソスiソスPソスjソスoソスbソスNソスAソスbソスvソスソスソスソスソスン抵ソス
[root@centos ~]# vi mastodon_backup.shソス@ソスソスソス@Mastodonソスfソス[ソス^ソスxソス[ソスXソスoソスbソスNソスAソスbソスvソスXソスNソスソスソスvソスgソス成
#!/bin/bash
sudo -u postgres pg_dumpall > /backup/pg_dumpall.sql 2>&1 | logger -t $(basename ${0})

[root@centos ~]# chmod +x mastodon_backup.shソス@ソスソスソス@Mastodonソスfソス[ソス^ソスxソス[ソスXソスoソスbソスNソスAソスbソスvソスXソスNソスソスソスvソスgソスノ趣ソスソスsソスソスソスソスソスtソスソス

[root@centos ~]# ./mastodon_backup.shソス@ソスソスソス@Mastodonソスfソス[ソス^ソスxソス[ソスXソスoソスbソスNソスAソスbソスvソスXソスNソスソスソスvソスgソスソスソスs

[root@centos ~]# ll /backup/pg_dumpall.sqlソス@ソスソスソス@Mastodonソスfソス[ソス^ソスxソス[ソスXソスoソスbソスNソスAソスbソスvソスソスソスハ確ソスF
-rw-r--r-- 1 root root 80539  6ソスソス 13 10:58 /backup/pg_dumpall.sql

[root@centos ~]# echo /backup/pg_dumpall.sql >> backuplistソス@ソスソスソス@ソスソスソスソスソスoソスbソスNソスAソスbソスvソス^ソスpソスニの連ソスg

[root@centos ~]# sed -i 's/\/root\/backup.sh/\/root\/mastodon_backup.sh ; \/root\/backup.sh/g' /etc/cron.d/backupソス@ソスソスソス@ソスソスソスソスソスoソスbソスNソスAソスbソスvソス^ソスpソスニの連ソスg

ソスソスMastodonソスAソスbソスvソスfソス[ソスg

ソスiソスPソスjMastodonソスAソスbソスvソスfソス[ソスgソスソスソスソスソス`ソスFソスbソスNソスン抵ソス
[root@centos ~]# vi /etc/cron.daily/mastodon-updatechkソス@ソスソスソス@MastodonソスAソスbソスvソスfソス[ソスgソスソスソスソスソス`ソスFソスbソスNソスXソスNソスソスソスvソスgソス成
#!/bin/bash

cd /home/mastodon/live/ ; git fetch 2>&1 | logger -t $(basename ${0})

# ソスソスソスンバソス[ソスWソスソスソスソスソスヤ搾ソスソス謫セ
CURRENT_VERSION=$(git branch|head -n 1|awk '{print $4}'|tr -d ")")

# ソスナ新ソスoソス[ソスWソスソスソスソスソスヤ搾ソスソス謫セソスiソスソスソスソスソスソスRCソスヘ擾ソスソスソスソスj
NEW_VERSION=$(git tag | grep -v rc | tail -n 1)

# ソスソスソスンバソス[ソスWソスソスソスソスソスソスソスナ新ソスフバソス[ソスWソスソスソスソスソスフ場合rootソスソスソスノソスソス[ソスソスソスハ知
if [ ${CURRENT_VERSION} != ${NEW_VERSION} ]; then
    echo "${CURRENT_VERSION} => ${NEW_VERSION}" | \
    mail -s "Mastodon Update!(${CURRENT_VERSION} => ${NEW_VERSION})" root
fi

[root@centos ~]# chmod +x /etc/cron.daily/mastodon-updatechkソス@ソスソスソス@MastodonソスAソスbソスvソスfソス[ソスgソスソスソスソスソス`ソスFソスbソスNソスXソスNソスソスソスvソスgソスヨ趣ソスソスsソスソスソスソスソスtソスソス
ソスソスLソスナ難ソスソスXMastodonソスAソスbソスvソスfソス[ソスgソスLソスソスソスソスソスソスソスソスソスナチソスFソスbソスNソスソスソスソスAソスAソスbソスvソスfソス[ソスgソスソスソスmソスソスソスソスrootソスソスソス[ソスUソス[ソスソスソスノソスソス[ソスソスソスナ通知ソスソスソスソスソスBソスソスMastodonソスAソスbソスvソスfソス[ソスgソスソスソスe

ソスiソスQソスjMastodonソスAソスbソスvソスfソス[ソスg
[root@centos ~]# su - mastodonソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソスヨ切托ソス

[mastodon@centos ~]$ cd live/ソス@ソスソスソス@MastodonソスCソスソスソスXソスgソス[ソスソスソスfソスBソスソスソスNソスgソスソスソスヨ移難ソス

[mastodon@centos live]# git checkout $(git tag | grep -v rc | tail -n 1)ソス@ソスソスソス@ソスナ新ソスoソス[ソスWソスソスソスソスソス_ソスEソスソスソスソスソス[ソスh

[mastodon@centos live]$ bundle install
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス

[mastodon@centos live]$ yarn install --pure-lockfile
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス

[mastodon@centos live]$ RAILS_ENV=production bundle exec rails db:migrateソス@ソスソスソス@DBソスレ行

[mastodon@centos live]$ RAILS_ENV=production bundle exec rails assets:precompileソス@ソスソスソス@ソスAソスZソスbソスgソスフプソスソスソスRソスソスソスpソスCソスソス
ソスソスソスソスソスヤゑソスソスソスソスソスソスソス


[mastodon@centos live]$ exitソス@ソスソスソス@mastodonソスソスソス[ソスUソス[ソスソスソス逕イソスソスソスソス

[root@centos ~]# systemctl restart mastodon-{web,sidekiq,streaming}ソス@ソスソスソス@Mastodonソスト起ソスソス
https://mstdn.centossrv.com/aboutソスノアソスNソスZソスXソスソスソスト最新ソスoソス[ソスWソスソスソスソスソスノなゑソスソストゑソスソス驍アソスニゑソスソスmソスFソスソスソスソスB

ソスソスMastodonソスソスソスソスソスNソスW



ソスソスソスヨ連ソスRソスソスソスeソスソスソスc

<!ソス\ソスeソスLソスXソスgソスフみゑソス4ソスsソス\ソスソスソスノ追会ソスソスソスCソスソスソスソスソスソス\>



ソスソスソスソスソスフペソス[ソスWソスフトソスbソスvソスヨ戻ゑソス

ソスvソスソスソスCソスoソスVソス[ソス|ソスソスソスVソス[
centossrv.com