Chinaunix首页 | 论坛 | 博客
  • 博客访问: 338023
  • 博文数量: 62
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 710
  • 用 户 组: 普通用户
  • 注册时间: 2013-05-14 14:12
个人简介

太懒

文章分类

全部博文(62)

文章存档

2015年(8)

2014年(20)

2013年(34)

我的朋友

分类: 其他UNIX

2013-06-20 17:08:52

Solaris 11 安装 zabbix-agent

 

 

# more /etc/release
                          Oracle Solaris 11 11/11 SPARC
  Copyright (c) 1983, 2011, Oracle and/or its affiliates.  All rights reserved.
                            Assembled 18 October 2011
#

# Get, unpack to root folder
cd
mkdir /root/zabbix
cd /root/zabbix
wget ftp://10.101.0.17/pub/kik/zabbix/zabbix_agents_2.0.6.solaris10.sparc.tar.gz -O /root/zabbix/zabbix_agents_2.0.6.solaris10.sparc.tar.gz
gunzip zabbix_agent*
tar -xvf zabbix_agent*
#wget ftp://my2950.momo.org/pub/kik/zabbix/zabbix_agents_2.0.6.solaris10.sparc.tar.gz
# Install binaries
cp bin/zabbix_* /usr/bin/
cp sbin/zabbix* /usr/sbin/
# Add user, group
groupadd -g 1221 zabbix
useradd -c 'Zabbix' -d / -g zabbix -s /usr/bin/false zabbix
# create config file
#/usr/local/etc/zabbix_agentd.conf
mkdir -p /etc/zabbix/conf.d
mkdir -p /usr/local/etc/
#echo "10.101.0.17 my2950.momo.org my2950" >> /etc/hosts
cat << EOF >/usr/local/etc/zabbix_agentd.conf
Hostname=$(hostname).$(domainname)
Server=10.111.0.17
Include=/etc/zabbix/conf.d/
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix_agentd.log
LogFileSize=100
Timeout=30
EOF
# make pid, log files
mkdir /var/run/zabbix && chown zabbix:zabbix /var/run/zabbix
touch /var/log/zabbix_agentd.log && chown zabbix:zabbix /var/log/zabbix_agentd.log
cat << EOF >/var/svc/manifest/site/zabbix-agent.xml



       
               
               
               
                       
               

               
               
               
               
       


EOF
svccfg import /var/svc/manifest/site/zabbix-agent.xml

# svcs -a|grep zabbix
disabled       16:52:49 svc:/application/zabbix-agent:default
# svcadm enable application/zabbix-agent
# svcs -a|grep zabbix
online         16:54:05 svc:/application/zabbix-agent:default
#

# more /var/log/zabbix_agentd.log
  3897:20130620:165405.028 Starting Zabbix Agent [T5120.]. Zabbix 2.0.6 (revision 35158).
  3898:20130620:165405.039 agent #0 started [collector]
  3899:20130620:165405.040 agent #1 started [listener]
  3900:20130620:165405.041 agent #2 started [listener]
  3901:20130620:165405.042 agent #3 started [listener]
#

阅读(4653) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~