feat: omc原始代码
This commit is contained in:
43
README.md
Normal file
43
README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# nms_nbi
|
||||
|
||||
网络管理系统-北向接口
|
||||
|
||||
## redis 配置文件相关
|
||||
|
||||
```conf
|
||||
# IP绑定与端口
|
||||
bind 0.0.0.0
|
||||
port 6379
|
||||
# 安全设置
|
||||
protected-mode yes
|
||||
requirepass ""
|
||||
# 从节点只能读取数据,不能直接写入数据
|
||||
slaveof 192.168.114.114 6379
|
||||
# 允许从节点进行读写操作
|
||||
replica-read-only no
|
||||
```
|
||||
|
||||
## 开发
|
||||
|
||||
```sh
|
||||
# 安装 Go版本 1.21.6 后进入项目根目录
|
||||
cd ./restagent
|
||||
# 下载依赖
|
||||
go mod download
|
||||
|
||||
# 调试启动
|
||||
go run restagent.go -c ./restagent/etc/restconf.yaml --env local
|
||||
|
||||
# 打包命名 restagent
|
||||
go build -ldflags="-s -w" -o restagent
|
||||
```
|
||||
|
||||
## 打包
|
||||
|
||||
```sh
|
||||
go env -w GOOS=linux
|
||||
|
||||
go env -w GOOS=windows
|
||||
|
||||
go build -o restagent -v -ldflags "-X 'nms_nbi/lib/global.Version=2.2311.8' -X 'nms_nbi/lib/global.BuildTime=`date`' -X 'nms_nbi/lib/global.GoVer=`go version`'"
|
||||
```
|
||||
Reference in New Issue
Block a user