收集点击日志

===========apache===========
LogFormat "%q&rmthost=%{X-Forwarded-For}i&inTime=%{%F:%H:%M:%S}t" common


LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent



    DocumentRoot /usr/local/apache2/htdocs
    ServerName report1.baihe.com
    SetEnvIf Request_URI "^/qudao\.html$" onlylog
    CustomLog "|/usr/sbin/rotatelogs /home/work/biworkspace/clickstream/logs/access.log.%Y%m%d%H%M%S 1800 480" common env=onlylog




基本的操作方法:
本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况
apahce启动命令:
推荐/usr/local/apache2/bin/apachectl start apaceh启动
apache停止命令
/usr/local/apache2/bin/apachectl stop   停止
apache重新启动命令:
/usr/local/apache2/bin/apachectl restart 重启
要在重启 Apache 服务器时不中断当前的连接,则应运行:

/usr/local/sbin/apachectl graceful




============netty================

  743  2014-12-22 15:50:15yum install -y nginx
  744  2014-12-22 15:51:05cd /tmp/
  745  2014-12-22 15:51:14wget http://nginx.org/download/nginx-1.7.8.tar.gz
  746  2014-12-22 15:51:24tar -zxvf nginx-1.7.8.tar.gz 
  747  2014-12-22 15:51:26cd nginx-1.7.8
  748  2014-12-22 15:51:40./configure prefix=/usr/local/nginx
  749  2014-12-22 15:51:49./configure perfix=/usr/local/nginx
  750  2014-12-22 15:52:00./configure --prefix=/usr/local/nginx
  751  2014-12-22 15:52:19yum -y install pcre*
  752  2014-12-22 15:52:33yum -y install openssl*
  753  2014-12-22 15:52:36./configure --prefix=/usr/local/nginx
  754  2014-12-22 15:52:52make
  755  2014-12-22 15:53:28make install
  756  2014-12-22 15:53:34cd /usr/local/nginx/conf/
  757  2014-12-22 15:53:36vi nginx.conf
  758  2014-12-22 15:55:13/usr/local/nginx/sbin/nginx 
  759  2014-12-22 15:55:18ps -ef|grep nginx
  760  2014-12-22 15:55:39pwd
  761  2014-12-22 15:55:41cd ../
  762  2014-12-22 15:55:42ls
  763  2014-12-22 15:55:43cd logs/
  764  2014-12-22 15:55:43ls
  765  2014-12-22 15:55:45ll
  766  2014-12-22 15:55:47tail -200f access.log 
  767  2014-12-22 15:57:25vi ../conf/nginx.conf
  768  2014-12-22 15:59:02/usr/local/nginx/sbin/nginx -t
  769  2014-12-22 15:59:05/usr/local/nginx/sbin/nginx -s reload
  770  2014-12-22 15:59:10tail -f access.log 



==========flume==========

nohup /home/work/apache-flume/bin/flume-ng agent -c conf -f /home/work/apache-flume/conf/flume-http-clicklog-convert.conf -n http_clicklog -Dflume.root.logger=INFO,console  > /home/work/apache-flume/logs/http-clicklog.log &
nohup /home/work/apache-flume/bin/flume-ng agent -c conf -f /home/work/apache-flume/conf/flume-http-clicklog-save.conf -n http_clicklog -Dflume.root.logger=INFO,console > /home/work/apache-flume/logs/http-clicklog.log &

你可能感兴趣的:(收集点击日志)