這篇文章主要介紹“open-falcon的詳細安裝步驟”,在日常操作中,相信很多人在open-falcon的詳細安裝步驟問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”open-falcon的詳細安裝步驟”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
成都創(chuàng)新互聯(lián)專注于沈河企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站設(shè)計,商城建設(shè)。沈河網(wǎng)站建設(shè)公司,為沈河等地區(qū)提供建站服務(wù)。全流程按需網(wǎng)站策劃,專業(yè)設(shè)計,全程項目跟蹤,成都創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
1、安裝工具
yum install git telnet net-tools tree nmap sysstat lrzsz dos2unix tcpdump ntpdate wget -y
2、系統(tǒng)配置
#時間配置 ntpdate ntp.aliyun.com #開啟緩存 sed -i 's#keepcache=0#keepcache=1#g' /etc/yum.conf grep keepcache /etc/yum.conf #關(guān)閉selinux sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 #關(guān)閉防火墻 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、上傳并執(zhí)行需要的五個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、后端安裝
#創(chuàng)建工作目錄 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)' #配置文件修改命令,空密碼更容易快速搭建,所以可以不用執(zhí)行這一步 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 #克隆數(shù)據(jù) 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 #環(huán)境配置 cd dashboard/ virtualenv ./env /env/bin/pip install -r pip_requirements.txt #備份并修改配置密碼,PORTAL_DB_USER 、PORTAL_DB_PASS這個需要注意,要么創(chuàng)建,要么改成root對應(yīng)信息 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、網(wǎng)頁登錄
11、客戶端安裝
只需要把server的agent 文件+open-falcon啟動文件copy到被監(jiān)控端,修改配置文件指向server端即可
ansible es -a "sed -i 's/0.0.0.0/192.168.56.21/g' /home/work/open-falcon/agent/config/cfg.json "
到此,關(guān)于“open-falcon的詳細安裝步驟”的學習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
標題名稱:open-falcon的詳細安裝步驟
轉(zhuǎn)載來源:http://weahome.cn/article/jdigei.html