安装Solo

可以参考其他大佬部分信息安装下载
Solo 用户指南
Solo 从设计到实现

1. 安装docker

2. 下载Solo的镜像

docker pull b3log/solo

3. 安装启动solo容器

我用的mysql8.0;1101端口和1102端口(ssl用的1101)

docker run --detach --name solo --network=host \
    --env RUNTIME_DB="MYSQL" \
    --env JDBC_USERNAME="***" \
    --env JDBC_PASSWORD="***" \
    --env JDBC_DRIVER="com.mysql.cj.jdbc.Driver" \
    --env JDBC_URL="jdbc:mysql://192.168.*.*:3306/***?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=PRC&&allowPublicKeyRetrieval=true" \
    b3log/solo --listen_port=1102 --server_scheme=https --server_host=www.***.com --server_port=1101

4. 配置nginx的nginx.conf

此文件默认在/etc/nginx下

events
    {
        use epoll;
        worker_connections 51200;
        multi_accept on;
    }
http{
  gzip on;
  gzip_min_length  1k;
  gzip_buffers     4 16k;
  gzip_http_version 1.1;
  gzip_comp_level 2;
  gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
  gzip_vary on;
  gzip_proxied   expired no-cache no-store private auth;
  gzip_disable   "MSIE [1-6]\.";

  server_tokens off;
  access_log off;

  upstream backend {
    server 127.0.0.1:1102; # Solo 监听端口
  }

  server {
    server_name www.***.com;
    listen 1101 ssl http2;
    ssl_certificate /etc/nginx/ssl_certs/1_www.***.com_bundle.crt;
    ssl_certificate_key /etc/nginx/ssl_certs/2_www.***.com.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
    ssl_session_cache builtin:1000 shared:SSL:10m;
    location / {
        proxy_pass http://backend$request_uri;
        proxy_set_header  Host $http_host;
        proxy_set_header  X-Real-IP $remote_addr;
        client_max_body_size  10m;
    }
    access_log  /etc/nginx/conf.d/www.***.com.log;
  }  
}

配置完我这直接访问就ok了,你们有问题直接在下方留言吧,我会慢慢根据你们的问题完善此文章

Q.E.D.


97年强迫症程序猿