Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5088845
  • 博文数量: 1609
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 14930
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
文章分类

全部博文(1609)

文章存档

2020年(26)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(229)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: 系统运维

2019-04-28 13:15:51

#!/bin/bash
init(){
yum install -y epel-* 
yum install -y wget vim git unzip  python-pip epel-release golang  redis 
pip install gunicorn
systemctl start redis
systemctl enable redis
systemctl stop firewalld
systemctl disable firewalld
sed -i "s/SELINUX=enforcing/SELINUX=disabled/"  /etc/selinux/config
setenforce 0 
}


mysql_install(){
#https://www.percona.com/downloads/Percona-Server-5.6/
yum install -y http://www.percona.com/downloads/percona-release/redhat/0.1-6/percona-release-0.1-6.noarch.rpm
yum install -y Percona-Server-server-56 Percona-Server-devel-56
service mysql start
mysqladmin -uroot password root123
}


falcon_pack() {
export GOROOT=/usr/lib/golang
export GOPATH=/home
mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone https://github.com/open-falcon/falcon-plus.git
cd $GOPATH/src/github.com/open-falcon/falcon-plus/scripts/mysql/db_schema/
mysql -h 127.0.0.1 -u root -proot123 < 1_uic-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 2_portal-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 3_dashboard-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 4_graph-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 5_alarms-db-schema.sql
cd $GOPATH/src/github.com/open-falcon/falcon-plus/
go get -v github.com/open-falcon/rrdlite
make all
make pack
}


falcon_install(){
export WORKSPACE=/home/work
mkdir -p $WORKSPACE
cd $GOPATH/src/github.com/open-falcon/falcon-plus/
tar -xzvf *.tar.gz -C $WORKSPACE
sed -i 's/root:/root:root123/g' /home/work/aggregator/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/graph/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/hbs/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/nodata/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/api/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/alarm/config/cfg.json
cd $WORKSPACE
./open-falcon start
}


falcon_dashboard(){
export FRONTSPACE=/home/front/open-falcon
mkdir -p $FRONTSPACE
cd $FRONTSPACE
git clone https://github.com/open-falcon/dashboard.git
yum groupinstall "Development tools" -y
yum install -y python-virtualenv python-devel openldap-devel openssl-devel libblockdev-crypto-devel
cd $FRONTSPACE/dashboard/
virtualenv ./env
./env/bin/pip install -r pip_requirements.txt
bash control start
#https://github.com/open-falcon/dashboard
#修改rrd/config.py

}

mymon:
go get -u github.com/open-falcon/mymon
cd $GOPATH/src/github.com/open-falcon/mymon
make
再配置IP就OK
https://github.com/sylzd/mymon/releases

https://jicki.me/linux/2017/08/18/Open-Falcon/
mail
go get -v github.com/zzlyzq/mail-provider
cd $GOPATH/src/github.com/zzlyzq/mail-provider
go get
./control build
./control pack
mkdir -p /home/work/mail-provider
mv falcon-mail-provider-0.0.1.tar.gz /home/work/mail-provider
cd /home/work/mail-provider
tar zxvf falcon-mail-provider-0.0.1.tar.gz
vi cfg.json
{
    "debug": true,
    "http": {
        "listen": "0.0.0.0:4000",
        "token": ""
    },
    "smtp": {
        "addr": "smtp.exmail.qq.com:587",
        "username": "rdsys@123.com",
        "password": "FEI",
        "from": "rdsys@123.com"
    }
}


./control start
./control tail
curl http://127.0.0.1:4000/sender/mail -d "tos=zheni@123.com&subject=xx&content=yy"


钉钉
https://github.com/sdvdxl/falcon-message


微信
https://github.com/Yanjunhui/chat


lvs:
yum update -y nss curl libcurl  libnl3-devel  libnl3
go get -v github.com/mesos-utility/lvs-metrics
cd $GOPATH/src/github.com/mesos-utility/lvs-metrics
./control build
./control pack
mkdir -p /home/work/lvs-metrics
mv lvs-metrics-v0.3.0.tar.gz /home/work/lvs-metrics
cd /home/work/lvs-metrics
./control start

mongomon
https://github.com/ZhuoRoger/mongomon
cd /home/work/
git clone https://github.com/ZhuoRoger/mongomon.git

redis
https://github.com/ZhuoRoger/redismon


进程数监控,端口
proc.num  tags: name=haproxy
https://blog.csdn.net/cry1049208942/article/details/85264737

expressions
https://blog.kazaff.me/2016/08/10/Open-Falcon%E5%88%9D%E6%8E%A2/

视频
https://www.jikexueyuan.com/course/1651_4.html?ss=1
阅读(474) | 评论(0) | 转发(0) |
0

上一篇:SkyAPM-php-sdk安装 php7.x

下一篇:lepus安装

给主人留下些什么吧!~~