tar xvf /soft/yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure&&make&&make install
继续安装ruby
tar xvf /soft/ruby-1.9.3-p484.tar.gz
cd ruby-1.9.3-p484
./configure --prefix=/usr/local/ruby --enable-shared --disable-install-doc --with-opt-dir=/usr/local/ && make &&make install
# Listen to incoming data over SSL
type secure_forward
shared_key 123456 #密码设置,随便设,保持两边一致就行
self_hostname logserver.test.com
cert_auto_generate yes
# Store Data in Elasticsearch
type copy
type elasticsearch
host localhost
port 9200
include_tag_key true
tag_key log_name
logstash_format true
flush_interval 1s
type mysql_slow_query
path /var/log/mysql/slow.log
tag master.slow_query
type secure_forward
shared_key 123456 #密码设置
self_hostname master.test.com
host 192.168.1.5
8、抓取tomcat日志(客户端 192.168.1.7)
我两个tomcat实例,所以配了两个source
编辑td-agent配置文件:/etc/td-agent/td-agent.conf
type tail
path /usr/local/tomcat/logs/catalina.out
pos_file /var/log/td-agent/tomcat_2_8080.log.pos
tag tomcat_2_8080
#format /^(?(\[.+?\]|^\t\S.*))(?\s.+?\s)(?([\s\S]*))|(?([\s\S]*))$/
format /^(?([\s\S]*))$/
type tail
path /usr/local/tomcat1/logs/catalina.out
pos_file /var/log/td-agent/tomcat_2_8081.log.pos
tag tomcat_2_8081
format /^(?([\s\S]*))$/
#format /^(?(\[.+?\]|^\t\S.*))(?\s.+?\s)(?([\s\S]*))|(?([\s\S]*))$/
type secure_forward
shared_key 123456
self_hostname tomcat.test.com
host 192.168.1.5
#!/bin/bash
#
# Script to start LVS DR real server.
# description: LVS DR real server
#
#. /etc/rc.d/init.d/functions
VIP=10.10.6.252
host='/bin/hostname'
case "$1" in
sta
大多数java开发者使用的都是eclipse,今天感兴趣去eclipse官网搜了一下eclipse.ini的配置,供大家参考,我会把关键的部分给大家用中文解释一下。还是推荐有问题不会直接搜谷歌,看官方文档,这样我们会知道问题的真面目是什么,对问题也有一个全面清晰的认识。
Overview
1、Eclipse.ini的作用
Eclipse startup is controlled by th
import java.util.Arrays;
/**
* 最早是在陈利人老师的微博看到这道题:
* #面试题#An array with n elements which is K most sorted,就是每个element的初始位置和它最终的排序后的位置的距离不超过常数K
* 设计一个排序算法。It should be faster than O(n*lgn)。
原网页被墙,放这里备用。 MySQLdb User's Guide
Contents
Introduction
Installation
_mysql
MySQL C API translation
MySQL C API function mapping
Some _mysql examples
MySQLdb