一 查看當前機器信息
1. 操作系統
2. hostname
[coolbeans@coolbeans-fluentd ~]$ cat /proc/sys/kernel/hostname
coolbeans-fluentd
[coolbeans@coolbeans-fluentd ~]$ hostname
coolbeans-fluentd
3. 内存
[coolbeans@coolbeans-fluentd ~]$ free
total used free shared buffers cached
Mem: 1922464 1067420 855044 0 256628 230204
-/+ buffers/cache: 580588 1341876
Swap: 4128760 0 4128760
[coolbeans@coolbeans-fluentd ~]$ cat /proc/meminfo
MemTotal: 1922464 kB
MemFree: 854912 kB
Buffers: 256628 kB
Cached: 230204 kB
SwapCached: 0 kB
Active: 690624 kB
Inactive: 193840 kB
Active(anon): 397784 kB
Inactive(anon): 4 kB
Active(file): 292840 kB
Inactive(file): 193836 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 4128760 kB
SwapFree: 4128760 kB
Dirty: 16 kB
Writeback: 0 kB
AnonPages: 397540 kB
Mapped: 26532 kB
Shmem: 164 kB
Slab: 150432 kB
SReclaimable: 91164 kB
SUnreclaim: 59268 kB
KernelStack: 1528 kB
PageTables: 4836 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 5089992 kB
Committed_AS: 645828 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 274520 kB
VmallocChunk: 34359447820 kB
HardwareCorrupted: 0 kB
AnonHugePages: 321536 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 8192 kB
DirectMap2M: 2088960 kB
4. CPU
[coolbeans@coolbeans-fluentd ~]$ cat /proc/cpuinfo | grep 'model name' |uniq
model name : Intel(R) Xeon(R) CPU X5660 @ 2.80GHz
5. Disk
[coolbeans@coolbeans-fluentd /]$ df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/mapper/vg_coolbeansfluentd-lv_root
50G 3.1G 44G 7% /
tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 485M 64M 397M 14% /boot
/dev/mapper/vg_coolbeansfluentd-lv_home
439G 1.6G 415G 1% /home
ulimit -n
三 安裝git
安裝其所依賴之包:
yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel
yum install autoconf
//安裝GIT
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
cd git-{date}
autoconf
./configure --with-curl=/usr/local
make
bundle exec ruby kibana.rb
/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch
/etc/td-agent/td-agent.conf
為:
type elasticsearch logstash_format true flush_interval 10s # for testing
sudo /etc/init.d/td-agent start
修改 KibanaConfig.rb 16行. 將 127.0.0.1 修改為 0.0.0.0 以綁定所有IP
# The adress ip Kibana should listen on
KibanaHost = '127.0.0.1'