See You Again

Dinorss 服务器部署

基于 Centos 8.0,包括系统、存储组件、应用服务等环境。

系统

执行更新,安装必要的包

  1. yum update
  2. yum install python3-devel
  3. yum install python3-psycopg2
  4. yum install supervisor

时区设置

  1. timedatectl set-local-rtc 0
  2. timedatectl set-timezone UTC

nginx

  1. yum install nginx

配置及静态文件目录:

  1. /etc/nginx/conf.d/*.conf
  2. /usr/share/nginx/html/

postgresql

  1. yum install postgresql-server
  2. yum install postgresql*
  3. postgresql-setup --initdb
  4. systemctl enable postgresql.service
  5. systemctl start postgresql.service

配置及重要配置 /var/lib/pgsql/data/*.conf 、 postgresql.conf

  1. timezone = 'UTC'
  2. client_encoding = 'UTF8'
  3. log_min_duration_statement = 5
  4. log_duration = off
  5. log_statement = 'mod'
  1. CREATE DATABASE dinorss OWNER postgres;
  1. host all all 127.0.0.1/32 trust

redis

重要配置 redis.conf

  1. daemonize yes
  2. loglevel warning
  3. logfile "/home/app/logs/redis/sys.log"
  4. maxmemory 2000000000
  5. maxmemory-policy noeviction

python3

  1. pip3 install django
  2. pip3 install certbot
  3. pip3 install gevent
  4. pip3 install gunicorn

更多依赖参考 requirements.txt

2020-11-23 喜欢

Copyright © 2015-2020 BY-NC-ND 4.0

回到顶部 ↑