go 备忘录

Posted by 姚飞亮 on 2020-07-07

go 备忘录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 编译
go build -o bc main.go
# bee go  编译linux
bee pack -be GOOS=linux
# ssh连接
ssh root@ip -o serveraliveinterval=10
# 查看所有进程
ps -aux
# 杀死进程
kill 11519
# 删除目录下文件
rm -rf /home/yaofeiliang/blockchain/blockchain/*
# 从本地拷贝文件至服务器
scp /Users/apple/Documents/app/go_project/src/blockchain_golang/blockchain_golang.tar.gz root@ip:/home/yaofeiliang/blockchain/blockchain
# 解压文件
tar -xvf blockchain_golang.tar.gz
# 后台启动go
nohup ./blockchain_golang &
# 编译给手机使用
gomobile bind -target=android mobile
# 挂载数据云盘
sudo mount /dev/vdb1 /home
# hexo 启动
/home/yaofeiliang/hexo-YBlog
nohup hexo server -p 9000 &

node /home/odqoo_svg/mg/mgvideo/bin/www
node /home/odqoo_svg/odqoo/bin/www
node /home/odqoo_svg/mg/MG/bin/www
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#nginx 配置备忘
server{
listen 80;
server_name www.zhzhkeji.com;
location / {
root /home/yaofeiliang/zhzhkeji/aiwebhome/zhzh;
index zhzh.html;
}
}
server{
listen 80;
server_name zhzhkeji.com;
location / {
root /home/yaofeiliang/zhzhkeji/aiwebhome/zhzh;
index zhzh.html;
}
}

server{
listen 80;
server_name www.aiwebhome.com;
location / {
root /home/yaofeiliang/zhzhkeji/aiwebhome/zhzh;
index zhzh.html;
}
}
server{
listen 80;
server_name aiwebhome.com;
location / {
root /home/yaofeiliang/zhzhkeji/aiwebhome/zhzh;
index zhzh.html;
}
}


upstream yaofeiliang.com {
server 127.0.0.1:9000;
}
server{
listen 80;
server_name yaofeiliang.com;
location / {
proxy_pass http://yaofeiliang.com;
}
}
server{
listen 80;
server_name www.yaofeiliang.com;
location / {
proxy_pass http://yaofeiliang.com;
}
}

upstream mgmanage.yaofeiliang.com {
server 127.0.0.1:5005;
}
server{
listen 80;
server_name mgmanage.yaofeiliang.com;
location / {
proxy_pass http://mgmanage.yaofeiliang.com;
}
}


Ω