抖音搜索:薇薇壁纸

golang
xshell 7
vue
vcode
go
node

nohup ./server &
npm run serve
npm run build
npm i 安装依赖
npm run dev 启动项目

admin.hmwlcm.cn(壁纸达人后端管理)
dy.hmwlcm.cn(api系统管理)
img.hmwlcm.cn(七牛云储存)
daren.hmwlcm.cn(壁纸达人端管理)

img_hmwlcm.cn
8iYHzwcCsPNpBJWJ

app_id:  tt142c62918b12b63201
app_secret:  c28d8aa43447bfc32ba187f8b91acaf55ccd7726

ybxshanghai
https://img.hmwlcm.cn
Y9gEr200ybJ1KpGKlQ6FT6mAScOj_xfV6l35jHYc
hVaYetzdTvI38oeySebhwrGYUS3LjDeOfKHf-klJ

1. 安装linux centos 7.8
2.安装redis ,nginx  

yum install redis
yum install nginx

3.安装golang 

wget -i -c https://dl.google.com/go/go1.17.5.linux-amd64.tar.gz
tar -xzvf go1.17.5.linux-amd64.tar.gz


添加环境变量,使用vim 打开/etc/profile 文件。

vim /etc/profile

解压在 usr/lib 文件夹下 ,然后配置环境

export GOROOT=/usr/lib/go
export GOPATH=/data/golang
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
export GO111MODULE=on
export GOPROXY=https://goproxy.io

强制执行

source /etc/profile

检测环境

go version

4. 创建data/golang/src 文件夹  mkdir XXX(创建XXX文件夹)

golang  

mysql

 ssl  

web

 src

scp -r D:\Nginx\*   root@101.34.186.179:/data/ssl

scp -r D:\yx\web\dist  root@101.34.186.179:/data/web/admin

scp -r D:\yx\daren\dist  root@101.34.186.179:/data/web/daren

scp -r D:\yx\server  root@101.34.186.179:/data/golang/src/yx

把代码copy到yx 目录下 然后 

1. go generate
2. go build -o server main.go (windows编译命令为go build -o server.exe main.go )
3. ./server 
4. nohup ./server &

5.配置https 在etc/nginx/nginx.conf

server {
    listen 443 ssl;
    server_name admin.hmwlcm.cn;
    ssl_certificate /data/ssl/admin.hmwlcm.cn_bundle.pem;
    ssl_certificate_key /data/ssl/admin.hmwlcm.cn.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;

    location / {
            root   /data/web/admin;
            try_files $uri $uri/ /index.html last;
            index  index.html index.htm;
        }
    error_page   500 502 503 504  /50x.html;   
    location = /50x.html {
        root   html;  
    }
}
server {
    listen 443 ssl;
    server_name daren.hmwlcm.cn;
    ssl_certificate /data/ssl/daren.hmwlcm.cn_bundle.pem;
    ssl_certificate_key /data/ssl/daren.hmwlcm.cn.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;

    location / {
            root   /data/web/daren;
            try_files $uri $uri/ /index.html last;
            index  index.html index.htm;
        }
    error_page   500 502 503 504  /50x.html;   
    location = /50x.html {
        root   html;  
    }

 }server {
        listen 443 ssl;
        server_name dy.hmwlcm.cn;
        ssl_certificate /data/ssl/dy.hmwlcm.cn_bundle.pem;
        ssl_certificate_key /data/ssl/dy.hmwlcm.cn.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;

         location / {
            root   html;
            index  index.html index.htm;
            proxy_pass http://127.0.0.1:8083;
        }
    }

6.修改小程序appid
7.修改系统的访问域名 

request合法域名

dy.hmwlcm.cn

uploadFile合法域名

upload-z0.qiniup.com

downloadFile合法域名 

img.hmwlcm.cn
img.cmingw.com
img.xinji666.com
dzn.qilayigou.com