What domain will your instance use? (e.g pleroma.soykaf.com) [] abc.xyz.com 你的网站的网址是什么?
What is the name of your instance? (e.g. Pleroma/Soykaf) [] abc.xyz.com 你的网站叫什么名字?
What is your admin email address? [] abc@163.com 网站管理员的电子邮箱地址是什么?
What email address do you want to use for sending email notifications? [abc@163.com] 你想要用哪个电子邮件地址来发送邮件通知?
Do you want search engines to index your site? (y/n) [n] 你希望搜索引擎收录你的网站吗?
Do you want to store the configuration in the database (allows controlling it from admin-fe)? (y/n) [n] y 你希望将配置信息存入数据库吗(开启管理控制台)?
Do you want to strip location (GPS) data from uploaded images? (y/n) [y] 是否要从上传的图像中删除地理位置(GPS)数据
Do you want to anonymize the filenames of uploads? (y/n) [n] 是否对上传的文件名进行匿名化处理?
Do you want to deduplicate uploaded files? (y/n) [n] 是否避免上传重复的文件?
填完表,剩下的全部按回车,保持默认即可
1 2 3 4 5 6 7 8 9 10 11 12
What is the hostname of your database? [localhost] What is the name of your database? [pleroma] What is the user used to connect to your database? [pleroma] What is the password used to connect to your database? [autogenerated] Would you like to use RUM indices? [n] n What port will the app listen to (leave it if you are using the default setup with nginx)? [4000] What ip will the app listen to (leave it if you are using the default setup with nginx)? [127.0.0.1] What directory should media uploads go in (when using the local uploader)? [/var/lib/pleroma/uploads] What directory should custom public files be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)? [/var/lib/pleroma/static] Do you want to strip location (GPS) data from uploaded images? (y/n) [y] Do you want to anonymize the filenames of uploads? (y/n) [n] Do you want to deduplicate uploaded files? (y/n) [n]
如果没有出错的话,你能看见以下内容
1 2 3 4 5 6 7 8
What directory should custom public files be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)? [/var/lib/pleroma/static] Writing config to /etc/pleroma/config.exs. Writing the postgres script to /tmp/setup_db.psql. Writing /var/lib/pleroma/static/robots.txt.
All files successfully written! Refer to the installation instructions for your platform for next steps. Please transfer your config to the database after running database migrations. Refer to "Transfering the config to/from the database" section of the docs for more information.
创建 postgres 数据库
1
su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
创建数据表
1
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
-----END CERTIFICATE----- [Sun Jul 5 02:35:19 UTC 2020] Your cert is in /root/.acme.sh/xyz.com/xyz.com.cer [Sun Jul 5 02:35:19 UTC 2020] Your cert key is in /root/.acme.sh/xyz.com/xyz.com.key [Sun Jul 5 02:35:19 UTC 2020] The intermediate CA cert is in /root/.acme.sh/xyz.com/ca.cer [Sun Jul 5 02:35:19 UTC 2020] And the full chain certs is there: /root/.acme.sh/xyz.com/fullchain.cer
# default nginx site config for Pleroma # # Simple installation instructions: # 1. Install your TLS certificate, possibly using Let's Encrypt. # 2. Replace 'example.tld' with your instance's domain wherever it appears. # 3. Copy this file to /etc/nginx/sites-available/ and then add a symlink to it # in /etc/nginx/sites-enabled/ and run 'nginx -s reload' or restart nginx.
server { server_name abc.xyz.com; # 把abc.xyz.com替换成pleroma实例的网址
listen 80; listen [::]:80;
# security
# Uncomment this if you need to use the 'webroot' method with certbot. Make sure # that the directory exists and that it is accessible by the webserver. If you followed # the guide, you already ran 'mkdir -p /var/lib/letsencrypt' to create the folder. # You may need to load this file with the ssl server block commented out, run certbot # to get the certificate, and then uncomment it. # # location ~ /\.well-known/acme-challenge { # root /var/lib/letsencrypt/; # } location / { return 301 https://abc.xyz.com$request_uri; # 把abc.xyz.com替换成pleroma实例的网址 } }
# Enable SSL session caching for improved performance ssl_session_cache shared:ssl_session_cache:10m;
server { server_name social.3cat.icu; # 把abc.xyz.com替换成pleroma实例的网址
# Add TLSv1.0 to support older devices ssl_protocols TLSv1.2; # Uncomment line below if you want to support older devices (Before Android 4.4.2, IE 8, etc.) # ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; ssl_prefer_server_ciphers on; # In case of an old server with an OpenSSL version of 1.0.2 or below, # leave only prime256v1 or comment out the following line. ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1; ssl_stapling on; ssl_stapling_verify on;
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only # and `localhost.` resolves to [::0] on some systems: see issue #930 proxy_pass http://127.0.0.1:4000;