open-falcon 安装重要步骤整理
作者:互联网
1、安装工具
yum install git telnet net-tools tree nmap sysstat lrzsz dos2unix tcpdump ntpdate wget -y
2、系统配置
#时间配置 ntpdate ntp.aliyun.com #开启缓存 sed -i 's#keepcache=0#keepcache=1#g' /etc/yum.conf grep keepcache /etc/yum.conf #关闭selinux sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 #关闭防火墙 systemctl stop firewalld.service systemctl disable firewalld.service
3、安装配置redis
yum install redis -y systemctl start redis systemctl enable redis systemctl status redis
4、安装MySQL,为了方便我这用的是空密码喲
yum install mariadb mariadb-server -y systemctl start mariadb systemctl enable mariadb mysql -uroot -p
5、上传并执行需要的五个SQL脚本
[root@mgr tmp]# rz rz waiting to receive. Starting zmodem transfer. Press Ctrl+C to cancel. Transferring 1_uic-db-schema.sql... 100% 1 KB 1 KB/sec 00:00:01 0 Errors Transferring 2_portal-db-schema.sql... 100% 7 KB 7 KB/sec 00:00:01 0 Errors Transferring 3_dashboard-db-schema.sql... 100% 3 KB 3 KB/sec 00:00:01 0 Errors Transferring 4_graph-db-schema.sql... 100% 1 KB 1 KB/sec 00:00:01 0 Errors Transferring 5_alarms-db-schema.sql... 100% 2 KB 2 KB/sec 00:00:01 0 Errors [root@mgr tmp]# for sqlfile in `ls |grep sql`; do mysql < $sqlfile ;done;
6、安装golang
yum install golang
7、后端安装
#创建工作目录 export FALCON_HOME=/home/work export WORKSPACE=$FALCON_HOME/open-falcon mkdir -p $WORKSPACE #上传下载好的版本并解压 https://github.com/open-falcon/falcon-plus/releases/download/v0.3/open-falcon-v0.3.tar.gz [root@mgr tmp]# rz rz waiting to receive. Starting zmodem transfer. Press Ctrl+C to cancel. Transferring open-falcon-v0.3.tar.gz... 100% 67075 KB 22358 KB/sec 00:00:03 0 Errors [root@mgr tmp]# tar xf open-falcon-v0.3.tar.gz -C $WORKSPACE [root@mgr tmp]# cd $WORKSPACE #配置文件查看 cat `find ./ -type f -name "cfg.json"|egrep "alarm|api|nodata|hbs|graph|aggregator"` |grep 'root:@tcp(127.0.0.1:3306)' #配置文件修改命令,空密码更容易快速搭建,所以可以不用执行这一步 sed -i 's#root:@tcp(127.0.0.1:3306)#root:123456@tcp(127.0.0.1:3306)#g' `find ./ -type f -name "cfg.json"|egrep "alarm|api|nodata|hbs|graph|aggregator"`
8、启动后端和本机agent
[root@mgr open-falcon]# ./open-falcon start [falcon-graph] 19882 [falcon-hbs] 19894 [falcon-judge] 19903 [falcon-transfer] 19910 [falcon-nodata] 19917 [falcon-aggregator] 19925 [falcon-agent] 19934 [falcon-gateway] 19943 [falcon-api] 19950 [falcon-alarm] 19963 [root@mgr open-falcon]# ./open-falcon check falcon-graph UP 19882 falcon-hbs UP 19894 falcon-judge UP 19903 falcon-transfer UP 19910 falcon-nodata UP 19917 falcon-aggregator UP 19925 falcon-agent UP 19934 falcon-gateway UP 19943 falcon-api UP 19950 falcon-alarm UP 19963 [root@mgr open-falcon]# ./open-falcon start agent [falcon-agent] 19934 [root@mgr open-falcon]# ./open-falcon check falcon-graph UP 19882 falcon-hbs UP 19894 falcon-judge UP 19903 falcon-transfer UP 19910 falcon-nodata UP 19917 falcon-aggregator UP 19925 falcon-agent UP 19934 falcon-gateway UP 19943 falcon-api UP 19950 falcon-alarm UP 19963
9、前端安装
cd $WORKSPACE #克隆数据 git clone https://github.com/open-falcon/dashboard.git
标签:KB,00,步骤,UP,root,falcon,open 来源: https://blog.51cto.com/860143/2439182