yanfei 发表于 2019-1-25 13:37:29

Centos 6.4 下 安装配置zabbix2.2.9(一)

  zabbix-server:192.168.1.63
  zabbix-agent:192.168.1.61
  服务器端:
  1.yum 源

  rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
  2. 安装服务器端:
yum install zabbix-server-mysql zabbix-web-mysql
  3. 安装agent端
  yum install zabbix-agent
  4. 配置数据库:

  mysql -uroot
  mysql> create database zabbix character set utf8 collate utf8_bin;
  mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
  mysql> exit
  导库

  cd /usr/share/doc/zabbix-server-mysql-2.2.0/create
  mysql -uroot zabbix < schema.sql
  mysql -uroot zabbix < images.sql
  mysql -uroot zabbix < data.sql
  5. 修改zabbix文件关于数据库的设置
  vi /etc/zabbix/zabbix_server.conf
  DBHost=localhost
  DBName=zabbix
  DBUser=zabbix
  DBPassword=zabbix
  6. 启动zabbix服务器端

  service zabbix-server start
  7. 修改php的设置
  vim   /etc/httpd/conf.d/zabbix.conf.
  php_value max_execution_time 300
  php_value memory_limit 128M
  php_value post_max_size 16M
  php_value upload_max_filesize 2M
  php_value max_input_time 300
  php_value date.timezone Asia/Shanghai 这个现在设置,后面页面就不会报错了。
  8. 启动http服务
  service httpd restart
  9. 配置agent
  Server=127.0.0.1这个ip如果写本机的ip的话,网页上会报错(Received empty response from Zabbix Agent at . Assuming that agent dropped connection)
  Hostname=jboss1.com
  BufferSize=1024
  StartAgents=3
  DebugLevel=2
  PidFile=/tmp/zabbix_agentd.pid
  LogFile=/tmp/zabbix_agentd.log
  LogFileSize=10
  EnableRemoteCommands=1
  UserParameter=viewESTABLISHED,viewESTABLISHED
  UserParameter=viewTIME_WAIT,viewTIME_WAIT
  UserParameter=viewLISTEN,viewLISTEN
  UserParameter=user.login
[*],who|grep $1 &>/dev/null;echo $?
  10. 启动agent
  /usr/sbin/zabbix_agentd-c /etc/zabbix/zabbix_agentd.conf
  




页: [1]
查看完整版本: Centos 6.4 下 安装配置zabbix2.2.9(一)