lx86 发表于 2019-1-22 06:40:14

zabbix完全安装

  ①环境

  yum -y install gcc mysql-server httpd php php-mysql php-gd php-bcmath php-xml php-mbstring mysql-devel php-snmp net-snmp-devel net-snmp net-snmp-utils OpenIPMI-devel curl-devel
  ②下载解压

  wget http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.10.tar.gz?download
  tar zxvf zabbix-2.0.10.tar.gz

  ③配置zabbix数据库

  useradd zabbix
  cd zabbix-2.0.10
  \cp -rf /usr/share/doc/mysql-server-5.0.77/my-medium.cnf /etc/my.cnf
  mysql_install_db --user=mysql
  /etc/init.d/mysqld start
  

  进入数据库:
  mysql -u root -p
  

  create database zabbix character set utf8;
  grant all on zabbix.* to zabbix@localhost identified by 'pwd@zabbix';
  grant all on zabbix.* to zabbix@127.0.0.1 identified by 'pwd@zabbix';
  

  flush privileges;
  quit
  

  退出数据库
  mysql -uzabbix -pzabbixpwd zabbix < create/schema/mysql.sql(schema.sql)
  mysql -uzabbix -pzabbixpwd zabbix < create/data/data.sql
  mysql -uzabbix -pzabbixpwd zabbix < create/data/images_mysql.sql
  

  ④编译安装zabbix
  ./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl --with-openipmi && \
  make && \
  make install
  ⑤zabbix服务配置
  * 服务端口定义:
  编辑 /etc/services,在后面追加:
  cat >> /etc/services > /etc/services
页: [1]
查看完整版本: zabbix完全安装