Installing GO
Download and Install Go Language
- Update your system using the following command.
### Debian 9 / Ubuntu 16.04 / 14.04 ###
# apt-get update
### CentOS / RHEL / Fedora ###
# yum -y update
- Install wget package
### Debian 9 / Ubuntu 16.04 / 14.04 ###
# apt-get install wget
### CentOS / RHEL / Fedora ###
# yum -y install wget
- Download the Go language binary package
# wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
- Extract the archive and move it to /usr/local
# tar -zxvf go1.9.2.linux-amd64.tar.gz -C /usr/local/
- Setup Go Environment variables
- temporary
export PATH=$PATH:/usr/local/go/bin
- permanent
place the above command in /etc/profile or $HOME/.profile file for persistent across sessions
- install gcc (this is generally required)
yum install gcc
- Verify Go Installation
# go version
go version go1.9.2 linux/amd64
# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/work"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
Build the binary for merakibeat
- Clone from (https://github.com/CiscoDevNet/merakibeat.git)
To clone merakibeat from the git repository, run the following commands
mkdir -p ${GOPATH}/src/github.com/CiscoDevNet/merakibeat
git clone https://github.com/CiscoDevNet/merakibeat.git ${GOPATH}/src/wwwin-github.cisco.com/DevNet/merakibeat
- Build
To build the binary for merakibeat run the command below. This will generate a binary in the same directory with the name merakibeat.
make
- Run
./merakibeat -c merakibeat.yml -e -d "*"