Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1760266
  • 博文数量: 150
  • 博客积分: 660
  • 博客等级: 上士
  • 技术积分: 2480
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-08 11:39
文章分类

全部博文(150)

文章存档

2019年(4)

2018年(36)

2017年(53)

2016年(7)

2015年(3)

2014年(3)

2013年(27)

2012年(2)

2011年(1)

2006年(1)

2005年(13)

分类: 系统运维

2018-01-30 18:35:03

open falcon 安装与freeipa集成--server的安装

系统环境

  • Centos 7.4 
  • go1.8.3
  • 5.5.56-MariaDB MariaDB Server
  • 3.2.10 redis
  • Python 2.7.5
  • git version 1.8.3.1

安装软件包和依赖

yum update -y

yum install -y epel-release

yum install git go redis

yum install -y mariadb-server  ## github上为mysql-server ,centos7.4上已默认为mariadb

启动依赖的数据库和缓存

[root@falcon falcon]# systemctl status mariadb
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
[root@falcon falcon]# systemctl start mariadb
[root@falcon falcon]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@falcon falcon]# systemctl status redis
● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: inactive (dead)
[root@falcon falcon]# systemctl start redis
[root@falcon falcon]# systemctl enable redis
Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
[root@falcon falcon]#

设置环境变量

vi /etc/profile

##  gopath
export GOPATH=/falcon/go

克隆 openfalcon文件

mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone 

导入数据文件

cd $GOPATH/src/github.com/open-falcon/falcon-plus/scripts/mysql/db_schema/
mysql -h 127.0.0.1 -u root -p < 1_uic-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 2_portal-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 3_dashboard-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 4_graph-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 5_alarms-db-schema.sql

编译

[root@falcon db_schema]# cd $GOPATH/src/github.com/open-falcon/falcon-plus/
[root@falcon falcon-plus]# make all
go build -o bin/agent/falcon-agent ./modules/agent
go build -o bin/aggregator/falcon-aggregator ./modules/aggregator
go build -o bin/graph/falcon-graph ./modules/graph
go build -o bin/hbs/falcon-hbs ./modules/hbs
go build -o bin/judge/falcon-judge ./modules/judge
go build -o bin/nodata/falcon-nodata ./modules/nodata
go build -o bin/transfer/falcon-transfer ./modules/transfer
go build -o bin/gateway/falcon-gateway ./modules/gateway
go build -o bin/api/falcon-api ./modules/api
go build -o bin/alarm/falcon-alarm ./modules/alarm
go build -ldflags "-X main.GitCommit=`git rev-parse --short HEAD` -X main.Version=0.2.1" -o open-falcon

安装执行文件到运行目录

export WorkDir="$HOME/open-falcon"
mkdir -p $WorkDir
tar -xzvf open-falcon-vx.x.x.tar.gz -C $WorkDir

执行

#Start all modules in single host
cd $WorkDir
./open-falcon start

## check modules status
./open-falcon check

[root@falcon open-falcon]# ./open-falcon check
        falcon-graph         UP           27023
          falcon-hbs         UP           27036
        falcon-judge         UP           27047
     falcon-transfer         UP           27055
       falcon-nodata         UP           27063
   falcon-aggregator         UP           27072
        falcon-agent         UP           27082
      falcon-gateway         UP           27091
          falcon-api         UP           27099
        falcon-alarm         UP           27113

阅读(1913) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~