小米监控 open-falcon ubuntu安装小记

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小米监控 open-falcon ubuntu安装小记相关的知识,希望对你有一定的参考价值。


ubuntu 安装open falcon

[email protected]:~# apt-get install -y redis-server
[email protected]:~# apt-get install -y mysql-server
[email protected]:~# apt-get install -y git



[email protected]:~# adduser work
[email protected]:~# su work
[email protected]:/root$ cd
[email protected]:~$ mkdir open-falcon
[email protected]:~$ ls -l
drwxrwxr-x 2 work work 4096  3月  2 09:43 open-falcon

[email protected]:~$ export HOME=/home/work
[email protected]:~$ export WORKSPACE=$HOME/open-falcon
[email protected]:~$ mkdir -p $WORKSPACE
[email protected]:~$ cd $WORKSPACE
[email protected]:~/open-falcon$
[email protected]:~/open-falcon$ pwd
/home/work/open-falcon

[email protected]:~/open-falcon$ git clone https://github.com/open-falcon/scripts.git
[email protected]:~/open-falcon$ echo $?
0

[email protected]:~/open-falcon$ cd scripts/
[email protected]:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/graph-db-schema.sql && echo $?
0

[email protected]:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/dashboard-db-schema.sql && echo $?
Enter password:
0
[email protected]:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/portal-db-schema.sql && echo $?
Enter password:
0
[email protected]:~/open-falcon/scripts$
[email protected]:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/links-db-schema.sql && echo $?
Enter password:
0
[email protected]:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/uic-db-schema.sql && echo $?
Enter password:
0




[email protected]:~/open-falcon/scripts$ uname -rm
3.19.0-47-generic x86_64

cd ~
wget http://dinp.qiniudn.com/go1.4.1.linux-amd64.tar.gz
tar zxf go1.4.1.linux-amd64.tar.gz
mkdir -p workspace/src
echo "" >> .bashrc
echo ‘export GOROOT=$HOME/go‘ >> .bashrc
echo ‘export GOPATH=$HOME/workspace‘ >> .bashrc
echo ‘export PATH=$GOROOT/bin:$GOPATH/bin:$PATH‘ >> .bashrc
echo "" >> .bashrc
source .bashrc

接下来clone代码,以备后用

cd $GOPATH/src
mkdir github.com
cd github.com
git clone --recursive https://github.com/XiaoMi/open-falcon.git




[email protected]:~/workspace/src/github.com/open-falcon/agent$ cd $GOPATH/src/github.com/open-falcon/agent
[email protected]:~/workspace/src/github.com/open-falcon/agent$ go get ./...
[email protected]:~/workspace/src/github.com/open-falcon/agent$ echo $?
0
 
[email protected]:~/workspace/src/github.com/open-falcon/agent$ bash control build
5.1.0
[email protected]:~/workspace/src/github.com/open-falcon/agent$ echo $?
0

[email protected]:~/workspace/src/github.com/open-falcon/agent$ bash control pack ;echo $?
5.1.0
fatal: Not a git repository (or any of the parent directories): .git
...tar falcon-agent-5.1.0.tar.gz <= public control cfg.example.json falcon-agent
0
[email protected]:~/workspace/src/github.com/open-falcon/agent$




[email protected]:/home/work/workspace/src/github.com/open-falcon/query# apt-get -y install python-virtualenv



[email protected]:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install libmysqld-dev libmysqlclient-dev

[email protected]:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install -y python-Flask python-Jinja2 python-Werkzeug   python-dateutil
[email protected]:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install gunicorn
[email protected]:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install python-mysqldb





  274  go get ./...
  275  go get -u github.com/beego/bee
  276  echo $?
  277  go get -u github.com/astaxie/beego
  278  echo $?
  279  bee fix
  280  echo $?
  281  go get ./...



关闭防火墙
访问ip地址的192.168.6.218:1234














本文出自 “魂斗罗” 博客,谢绝转载!

以上是关于小米监控 open-falcon ubuntu安装小记的主要内容,如果未能解决你的问题,请参考以下文章

小米开源监控系统Open-Falcon安装使用笔记

小米监控--Open-Falcon

小米开源监控系统open-falcon

小米open-falcon监控系统接入手册

Open-Falcon第四步安装Graph(小米开源互联网企业级监控系统)

Open-Falcon第三步安装Agent (小米开源互联网企业级监控系统)