ServerManagerSystem

command module
v0.0.0-...-66ffdac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: MIT Imports: 3 Imported by: 0

README

ServerManagerSystem

一个基于Golang开发的远程服务管理系统,使用RPC远程调度,管理服务器进程保持、数据库远程调度等

说明
  • RPC部分基于Hprose的RPC框架实现
  • 本人第一次开源Golang项目,处于学习和探索阶段,尚有很多不完善
  • 本项目主要功能是:
    1. 实现客户端简单配置自动RPC链接
    2. 实现客户端FRP NPS简单远程配置即可自动上线
    3. 实现远程shell/sftp的管理
    4. 实现远程和本地的进程保持
    5. 实现远程的SQL调度
    6. 简单的防火墙开关
    7. 基于VUE的管理页面
    8. 默认用户名:admin 密码:123456
使用说明
  • 以debian10为例安装golang

    wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz
    sudo tar -C /usr/local -xzf go1.16.6.linux-amd64.tar.gz
    echo 'export PATH=$PATH:/usr/local/go/bin'>> ~/.profile
    source ~/.profile
    go version
    
  • 编译并使用本程序

    git clone https://github.com/uouuou/ServerManagerSystem.git
    apt install upx-ucl
    cd ServerManagerSystem/
    go mod vendor
    sh build.sh
    cd output
    chmod -R 755 ServerManagerSystem_x86_64_upx 
    # 这里只是示意,具体你生成的文件取决于你的操作系统亲具体查看文件名称
    ./ServerManagerSystem_linux_amd64_upx  install
    service serverManagerSystem_server start
    journalctl -u serverManagerSystem_server.service -f
    # 如果第一次启动无法打开WEB端请重新启动程序即可,WEB端口默认为:8000
    # 本程序使用了sqllite3所以需要gcc环境才能编译,请务必自行安装gcc
    
    # 客户端模式下
    ./ServerManagerSystem_linux_amd64_upx -m client install
    service serverManagerSystem_client start
    journalctl -u serverManagerSystem_client.service -f
    # 卸载程序
    ./ServerManagerSystem_linux_amd64_upx -m client uninstall
    
  • 配置文件解析:

    # 服务器端:
    # setting:
    port :服务端运行端口 (WEB页面访问该端口即可)
    runDir :程序运行路径
    redType :xftp读取为了将的后缀名
    rpcPort :客户端登录的RPC通信端口     
    auth :客户端与服务端的通信密钥
    # sql:
    dbType :数据库类型目前支持mysql和sqllite 默认使用sqllite如果需要mysql请在后方配置
    dbName: ""
    DbUser: ""
    DbPass: ""
    DbHost: ""
    DbPort: 0
    # 客户端:
    port: 客户端运行端口
    runDir : 客户端运行位置
    server : 服务端地址例如 tcp://127.0.0.1:8001
    userid : 客户端唯一识别码 自动生成 先运行client客户端生成uuid以后再配置文件
    serverHttp : 服务端http地址 例如 http://127.0.0.1:8000
    auth : 客户端与服务端的通信密钥 两端保持一致
    
界面展示

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL