您好,登錄后才能下訂單哦!
這篇文章主要介紹“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的詳細安裝步驟”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。