open-falcon的详细安装步骤
这篇文章主要介绍“open-falcon的详细安装步骤”,在日常操作中,相信很多人在open-falcon的详细安装步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”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 #安装依赖 yum install -y python-virtualenv yum install -y python-devel yum install -y openldap-devel yum install -y mysql-devel yum groupinstall "Development tools" -y #安装pip yum -y install python-pip #环境配置 cd dashboard/ virtualenv ./env /env/bin/pip install -r pip_requirements.txt #备份并修改配置密码,PORTAL_DB_USER 、PORTAL_DB_PASS这个需要注意,要么创建,要么改成root对应信息 cp rrd/config.py{,.bak} vim rrd/config.py #启动并查看 [root@mgr dashboard]# source env/bin/activate (env) [root@mgr dashboard]# ./control start falcon-dashboard started..., pid=1635 (env) [root@mgr dashboard]# netstat -nltp
10、网页登录
11、客户端安装
只需要把server的agent 文件+open-falcon启动文件copy到被监控端,修改配置文件指向server端即可
ansible es -a "sed -i 's/0.0.0.0/192.168.56.21/g' /home/work/open-falcon/agent/config/cfg.json "
到此,关于“open-falcon的详细安装步骤”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!
网页题目:open-falcon的详细安装步骤
分享网址:http://pwwzsj.com/article/jdigei.html