Last active
August 29, 2015 14:01
-
-
Save zhpengg/3ce2cdba4ef30c8e1114 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 依赖环境 | |
0. 两个程序运行都需要 java 环境, 运行 `java -version` 确保 java 版本是 1.6 以上. | |
1. 这个系统涉及到两台机器: a) 前端 access log 所在的机器:FE b) 后端实时计算机器: BE | |
2. 日志收集程序 `flume` 安装在 FE 机器上, 数据库 `mongodb` 和 `spark` 安装在 BE 机器上. | |
## 安装数据库 mongodb | |
1. 到 `http://www.mongodb.org/downloads` 找到适合系统的 mongodb 下载, 无需安装, 解压即可运行. | |
2. 进到 mongodb 文件夹, 执行 `mkdir data` 建立数据文件夹. | |
3. 执行 `nohup ./bin/mongod --dbpath data &> nohup.log &` 在后台启动 mongodb | |
## 安装日志实时采集程序 flume | |
1. 到 FE 机器上, 下载 `apache-flume-1.5.0-bin-wd.tgz` 到前端 WEB 日志所在的机器, 解压. | |
2. 打开 `conf/flume-conf.properties`, 修改 `tail1.sources.source1.command` 中 access.log 路径到实际路径. 修改 `tail1.sinks.sink1.hostname` 指向 `spark-flume` 程序所在机器. | |
3. 执行 `sh run.sh` 启动 flume | |
## 安装实时处理入库程序 SparkFlume | |
1. 到 BE 机器上, 下载 `spark-flume.tgz` 并解压. | |
2. 执行 `sh bin/run.sh <当前机器的hostname> 9090`, hostname 可以通过执行 `hostname` 获取 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment