Code Monkey home page Code Monkey logo

imp-agent's Introduction

依赖

  • Go1.21及以上版本

构建

Linux下安装编译环境

  1. 登录golang官网或者golang**官方镜像下载最新的稳定版本的go安装包并安装。

    $ wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
    # 解压缩后go被安装在/usr/local/go
    $ sudo tar -xzvf ./go1.21.1.linux-amd64.tar.gz -C /usr/local/
  2. 配置go环境变量

    $ cat << "EOF" >> ~/.bashrc
    export GOROOT=/usr/local/go
    export PATH=$PATH:$GOROOT/bin
    EOF
    $ source ~/.bashrc

源代码编译

  1. 源码下载与编译

    $ git clone https://github.com/saikey0379/imp-agent.git
    
    $ cd /imp-agent
    $ go build -o ./bin/imp-agent ./cmd/main.go
    $ ls -l bin
    total 133848
    -rwxr-xr-x  1 root  root    16M  3  1 10:36 imp-agent
  2. RPMbuild

    $ yum -y install rpmbuild
    
    $ VERSION=v0.0.1
    $ tar -zcvf /root/rpmbuild/SOURCES/imp-agent-${VERSION}.tgz bin/ conf/ deploy/systemd/
    $ sed "s/VERSION/${VERSION}/g" deploy/rpmbuild/imp-agent.spec > imp-agent_${VERSION}.spec
    $ rpmbuild -bb imp-agent_${VERSION}.spec
    $ mv /root/rpmbuild/RPMS/x86_64/imp-agent-${VERSION}-0.x86_64.rpm .

安装

  1. Agent安装
    $ rpm -ivh /root/rpmbuild/RPMS/x86_64/imp-agent-${VERSION}-0.x86_64.rpm
  2. 启动
    $ systemctl enable imp-agent && systemctl start imp-agent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.