docs: 说明文件修改
This commit is contained in:
38
README.md
38
README.md
@@ -36,7 +36,7 @@ go run omc.go -c ./omc/etc/omc.yaml --env local
|
||||
go build -ldflags="-s -w" -o omc
|
||||
```
|
||||
|
||||
## 打包
|
||||
## 单程序打包
|
||||
|
||||
```sh
|
||||
go env -w GOOS=linux
|
||||
@@ -45,3 +45,39 @@ go env -w GOOS=windows
|
||||
|
||||
go build -o omc -v -ldflags "-X 'nms_cxy/lib/global.Version=2.2311.8' -X 'nms_cxy/lib/global.BuildTime=`date`' -X 'nms_cxy/lib/global.GoVer=`go version`'"
|
||||
```
|
||||
|
||||
## Deb 打包
|
||||
|
||||
`build` 目录内 `build\debbuild` 修改配置
|
||||
|
||||
```sh
|
||||
# 可执行
|
||||
chmod +x build.sh
|
||||
./build.sh deb
|
||||
|
||||
# 卸载程序
|
||||
dpkg -r omc
|
||||
sudo rm -rf /usr/local/omc
|
||||
|
||||
# 安装程序
|
||||
dpkg -i omc-xxx.deb
|
||||
|
||||
# 安装 Nginx
|
||||
apt install -y nginx
|
||||
# 1解除gzip注释 2注释conf.d下面的一行
|
||||
vim /etc/nginx/nginx.conf
|
||||
# 检查配置
|
||||
vim /etc/nginx/conf.d/default.conf
|
||||
# 重启 Nginx
|
||||
systemctl restart nginx
|
||||
|
||||
# 安装 Mysql
|
||||
|
||||
# 修改初始数据库连接地址
|
||||
vim /usr/local/omc/bin/importdb.sh
|
||||
# 执行安装
|
||||
/usr/local/omc/bin/importdb.sh install
|
||||
|
||||
# 服务重启
|
||||
sudo /usr/local/omc/bin/omcsvc.sh restart
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user