当前位置:   article > 正文

sql审核平台Yearning搭建_yearning设置logfile

yearning设置logfile

一、数据库的操作

CREATE DATABASE Yearning CHARACTER SET utf8 COLLATE utf8_bin;

二、软件的配置

目录 /opt/Yearning-go

配置文件

  1. #/opt/Yearning-go# cat conf.toml
  2. [Mysql]
  3. Db = "Yearning"
  4. Host = "127.0.0.1"
  5. Port = "3306"
  6. Password = "xxxxxx"
  7. User = "root"
  8. [General]
  9. SecretKey = "4BGhf4s1Y4d4UWVU"

三、软件的管理

管理软件的安装配置

  1. #apt-get install python3-pip
  2. #pip3 install supervisor
  3. #echo_supervisord_conf > /etc/supervisord.conf
  4. #mkdir -p /etc/supervisord
  5. #ess /etc/supervisord.conf 修改如下部分
  6. [include]
  7. files = /etc/supervisord/*.conf

服务管理脚本

  1. # cat /etc/supervisord/Yearning.conf
  2. [program:Yearning]
  3. command = /opt/Yearning-go/Yearning -s -b "sql.deepwise.com" -p "9000"
  4. directory = /opt/Yearning-go/
  5. process_name = %(program_name)s_%(process_num)s
  6. numprocs = 1
  7. autorestart = true
  8. startsecs = 1
  9. stdout_logfile_maxbytes = 50MB
  10. stdout_logfile_backups = 20
  11. stdout_logfile = /var/log/Yearning.log
  12. stderr_logfile = /var/log/Yearning.log

最后 nginx的配置

  1. # cat /soft/openresty/nginx/conf/vhosts/sql.deepwise.com.conf
  2. upstream sql {
  3. server 127.0.0.1:9000;
  4. }
  5. server {
  6. listen 80;
  7. server_name sql.deepwise.com;
  8. location / {
  9. proxy_set_header Host $host;
  10. proxy_set_header X-Forward-For $remote_addr;
  11. proxy_pass http://sql;
  12. }
  13. }
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/912886
推荐阅读
相关标签
  

闽ICP备14008679号