标签:小米监控 open-falcon ubuntu安装小记
ubuntu 安装open falcon
root@ubuntu:~# apt-get install -y redis-server
root@ubuntu:~# apt-get install -y mysql-server
root@ubuntu:~# apt-get install -y git
root@ubuntu:~# adduser work
root@ubuntu:~# su work
work@ubuntu:/root$ cd
work@ubuntu:~$ mkdir open-falcon
work@ubuntu:~$ ls -l
drwxrwxr-x 2 work work 4096 3月 2 09:43 open-falcon
work@ubuntu:~$ export HOME=/home/work
work@ubuntu:~$ export WORKSPACE=$HOME/open-falcon
work@ubuntu:~$ mkdir -p $WORKSPACE
work@ubuntu:~$ cd $WORKSPACE
work@ubuntu:~/open-falcon$
work@ubuntu:~/open-falcon$ pwd
/home/work/open-falcon
work@ubuntu:~/open-falcon$ git clone https://github.com/open-falcon/scripts.git
work@ubuntu:~/open-falcon$ echo $?
0
work@ubuntu:~/open-falcon$ cd scripts/
work@ubuntu:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/graph-db-schema.sql && echo $?
0
work@ubuntu:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/dashboard-db-schema.sql && echo $?
Enter password:
0
work@ubuntu:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/portal-db-schema.sql && echo $?
Enter password:
0
work@ubuntu:~/open-falcon/scripts$
work@ubuntu:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/links-db-schema.sql && echo $?
Enter password:
0
work@ubuntu:~/open-falcon/scripts$ mysql -h localhost -u root -p < db_schema/uic-db-schema.sql && echo $?
Enter password:
0
work@ubuntu:~/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
work@ubuntu:~/workspace/src/github.com/open-falcon/agent$ cd $GOPATH/src/github.com/open-falcon/agent
work@ubuntu:~/workspace/src/github.com/open-falcon/agent$ go get ./...
work@ubuntu:~/workspace/src/github.com/open-falcon/agent$ echo $?
0
work@ubuntu:~/workspace/src/github.com/open-falcon/agent$ bash control build
5.1.0
work@ubuntu:~/workspace/src/github.com/open-falcon/agent$ echo $?
0
work@ubuntu:~/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
work@ubuntu:~/workspace/src/github.com/open-falcon/agent$
root@ubuntu:/home/work/workspace/src/github.com/open-falcon/query# apt-get -y install python-virtualenv
root@ubuntu:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install libmysqld-dev libmysqlclient-dev
root@ubuntu:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install -y python-Flask python-Jinja2 python-Werkzeug python-dateutil
root@ubuntu:/home/work/workspace/src/github.com/open-falcon/dashboard# apt-get install gunicorn
root@ubuntu:/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安装小记
原文地址:http://990487026.blog.51cto.com/10133282/1747125