这篇文章主要介绍“open-falcon的详细安装步骤”,在日常操作中,相信很多人在open-falcon的详细安装步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”open-falcon的详细安装步骤”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
创新互联是一家集网站建设,铁锋企业网站建设,铁锋品牌网站建设,网站定制,铁锋网站建设报价,网络营销,网络优化,铁锋网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。1、安装工具
yum install git telnet net-tools tree nmap sysstat lrzsz dos2unix tcpdump ntpdate wget -y2、系统配置
#时间配置 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.service3、安装配置redis
yum install redis -y systemctl start redis systemctl enable redis systemctl status redis4、安装MySQL,为了方便我这用的是空密码喲
yum install mariadb mariadb-server -y systemctl start mariadb systemctl enable mariadb mysql -uroot -p5、上传并执行需要的五个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 golang7、后端安装
#创建工作目录 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 199639、前端安装
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 -nltp10、网页登录
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的详细安装步骤”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。