cz-sjm 发表于 2018-10-24 06:03:33

zabbix Server 端安装

  Zabbix server 安装配置文档
  环境准备
  Zabbix Server需要运行在CentOS、RedHat Linux、Debain等Linux系统上,这里以CentOS6作为部署环境,Root用户安装必须的包,建议配置好yum,通过yum安装下列包,解决包的依赖关系。
  1)      LAMP(Linux+ Apache + Mysql + PHP)环境
  yum installmysql-server httpd php
  2)      安装依赖包
  yum installmysql-devel net-snmp-devel OpenIPMI-devel openssl-develfping-devel libcurl-develperl-DBI php-gd php-mysql php-bcmath php-mbstring php-xml gcc
  3)可以到官网下载最新安装包
  http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.3/zabbix-2.2.3.tar.gz
  或者采用yum安装
  http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/红帽yum源
  安装步骤
  1)创建zabbix用户和组
  groupadd zabbix
  useradd zabbix-g zabbix
  2)创建数据库,添加授权账号
  create databasezabbix character set utf8;
  grant allprivileges on zabbix.* to zabbix@localhost>
  3) 编译安装zabbix
  tar xzf zabbix-2.2.3.tar.gz
  cd zabbix-2.2.3
  ./configure--prefix=/usr/local/zabbix--enable-server--enable-agent \
  --with-mysql--with-net-snmp--with-libcurl
  makeinstall
  4)导入数据库
  mysql -uzabbix-pzabbix -hlocalhost zabbix < database/mysql/schema.sql
  mysql -uzabbix-pzabbix -hlocalhost zabbix < database/mysql/images.sql
  mysql -uzabbix -pzabbix-hlocalhost zabbix < database/mysql/data.sql
  5)修改配置文件
  cpmisc/init.d/fedora/core/zabbix_server   /etc/init.d/
  cpmisc/init.d/fedora/core/zabbix_agentd/etc/init.d/
  cp -Rfrontends/php /var/www/html/zabbix
  sed -i's/^DBUser=.*$/DBUser=zabbix/g' /usr/local/zabbix/etc/zabbix_server.conf
  sed -i's/^.*DBPassword=.*$/DBPassword=zabbix/g'/usr/local/zabbix/etc/zabbix_server.conf
  sed -i's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g'/etc/init.d/zabbix_server
  sed -i's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g'/etc/init.d/zabbix_agentd
  6)添加服务端口
  cat>>/etc/services/etc/rc.local
  echo"/etc/init.d/zabbix_agentd start" >> /etc/rc.local
  8)修改php.ini
  Vi /etc/php.ini
  memory_limit = 256M
  date.timezone = Asia/Shanghai
  post_max_size = 32M
  max_execution_time = 600
  upload_max_filesize = 16M
  max_input_time = 600
  9)web页面安装配置,打开浏览器输入http://zabbixserver ip地址/zabbix
  确认每个Required都是ok的才会显示Next按钮,如果有Fail的需要完善系统要求
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  更换中文字体,登陆后在页面的右上边点击“Prefile”
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  在Language选项中选择“Chinese(zh_CN)”,然后Save
  http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  
  
  
  
  
  
  

页: [1]
查看完整版本: zabbix Server 端安装