文章目录
        
            
        
    
    
    
    
                  - nginx - 1 
 2
 3
 4
 5
 6
 7
 8
 9
 10- server { listen 80; server_name localhost [www.example.com](http://www.example.com/); 
 root /Users/yangyi/www; #全局定义,表示在该server下web的根目录
 client_max_body_size 100M;
 keepalive_timeout 20;
 index index.php index.html index.htm;
 charset utf-8;
 access_log logs/host.access.log main; #用来指定此虚拟主机的访问日志存放路径,输出格式为main。
 error_log logs/host.error.log error; #错误日志存放路径,输出格式为error。
 error_page 404 /404.html; #状态码为404时的时候的网页地址,还可定义500,502之类的 ....
 } 以上一些配置为在该server下具有全局性,例如- nginx允许跨域配置:return 204;上是针对预检请求(preflight request),后面add_header 是应对的CROS浏 - 1 
 2
 3
 4
 5
 6
 7
 8
 9- location / { 
 if ($request_method = 'OPTIONS') {
 return 204;
 }
 add_header Access-Control-Allow-Origin *;
 add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
 add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
 }
- docker - 1 
 2
 3
 4
 5
 6- docker run -d -p 80:8001 --name kodexplorer -v <path/to/data>:/var/www/html xaljer/kodexplorer 
 docker run -d -p 8001:8001 --name yangxuan8282/kodexplorer -v "$PWD":/var/www/html yangxuan8282/kodexplorer
 docker run --name=my_portainer -d -p 80:8001 -v /var/run/docker.sock:/var/run/docker.sock
 docker run --name=kodexplorer -d -p 8001:8001 -v /var/run/docker.sock:/var/run/docker.sock
 docker run --privileged=true -d -p 8001:80 --name kod-dockerfile-1 kod:v8
- npm - 1 
 2
 3
 4
 5
 6
 7
 8
 9- cnpm intall hexo-generator-search --save 
 cnpm intall hexo-prism-plugin --save
 cnpm install hexo-all-minifier --save
 cnpm i -S hexo-prism-plugin --save
 npm config set proxy http://127.0.0.1:7890
 npm config list
 npm config set registry
 npm install --registry=https://registry.npm.taobao.org
- postgresql - 1. 修改postgresql.conf - postgresql.conf存放位置在/etc/postgresql/9.x/main下,这里的x取决于你安装PostgreSQL的版本号,编辑或添加下面一行,使PostgreSQL可以接受来自任意IP的连接请求。 - listen_addresses = ‘*’ - 2. 修改pg_hba.conf - pg_hba.conf,位置与postgresql.conf相同,虽然上面配置允许任意地址连接PostgreSQL,但是这在pg中还不够,我们还需在pg_hba.conf中配置服务端允许的认证方式。任意编辑器打开该文件,编辑或添加下面一行。 - # TYPE DATABASE USER CIDR-ADDRESS METHOD host all all 0.0.0.0/0 md5 
 
                                