全部博文(150)
分类: 系统运维
2018-01-30 18:35:03
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
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