1. 安装依赖包
2. 安装zabbix
3. 设置zabbix
1. 安装依赖包
# yum install OpenIPMI-devel Installed: OpenIPMI-devel.x86_64 0:2.0.16-14.el6 Dependency Installed: OpenIPMI.x86_64 0:2.0.16-14.el6 OpenIPMI-libs.x86_64 0:2.0.16-14.el6 lm_sensors-libs.x86_64 0:3.1.1-17.el6 ncurses-devel.x86_64 0:5.7-3.20090208.el6 net-snmp-libs.x86_64 1:5.5-50.0.1.el6_6.1 Complete!
# yum install libssh2-devel Installed: libssh2-devel.x86_64 0:1.4.2-1.el6_6.1 Dependency Installed: keyutils-libs-devel.x86_64 0:1.4-5.el6 krb5-devel.x86_64 0:1.10.3-37.el6_6 libcom_err-devel.x86_64 0:1.42.8-1.0.2.el6 libselinux-devel.x86_64 0:2.0.94-5.8.el6 libsepol-devel.x86_64 0:2.0.41-4.el6 openssl-devel.x86_64 0:1.0.1e-30.el6_6.8 zlib-devel.x86_64 0:1.2.3-29.el6 Dependency Updated: e2fsprogs.x86_64 0:1.42.8-1.0.2.el6 e2fsprogs-libs.x86_64 0:1.42.8-1.0.2.el6 krb5-libs.x86_64 0:1.10.3-37.el6_6 libcom_err.x86_64 0:1.42.8-1.0.2.el6 libss.x86_64 0:1.42.8-1.0.2.el6 libssh2.x86_64 0:1.4.2-1.el6_6.1 openssl.x86_64 0:1.0.1e-30.el6_6.8 Complete!
# yum install libcurl-devel Installed: libcurl-devel.x86_64 0:7.19.7-40.el6_6.4 Dependency Installed: autoconf.noarch 0:2.63-5.1.el6 automake.noarch 0:1.11.1-4.el6 libidn-devel.x86_64 0:1.18-2.el6 Dependency Updated: curl.x86_64 0:7.19.7-40.el6_6.4 libcurl.x86_64 0:7.19.7-40.el6_6.4 Complete!
# yum install net-snmp-devel Installed: net-snmp-devel.x86_64 1:5.5-50.0.1.el6_6.1 Dependency Installed: elfutils-devel.x86_64 0:0.158-3.2.el6 elfutils-libelf-devel.x86_64 0:0.158-3.2.el6 file-devel.x86_64 0:5.04-21.el6 lm_sensors-devel.x86_64 0:3.1.1-17.el6 popt-devel.x86_64 0:1.13-7.el6 rpm-devel.x86_64 0:4.8.0-38.el6_6 tcp_wrappers-devel.x86_64 0:7.6-57.el6 Dependency Updated: rpm.x86_64 0:4.8.0-38.el6_6 rpm-libs.x86_64 0:4.8.0-38.el6_6 rpm-python.x86_64 0:4.8.0-38.el6_6 Complete!
# yum install libxml2-devel Installed: libxml2-devel.x86_64 0:2.7.6-17.0.1.el6_6.1 Dependency Updated: libxml2.x86_64 0:2.7.6-17.0.1.el6_6.1 libxml2-python.x86_64 0:2.7.6-17.0.1.el6_6.1 Complete!
# yum install openldap-devel Installed: openldap-devel.x86_64 0:2.4.39-8.el6 Dependency Installed: cyrus-sasl-devel.x86_64 0:2.1.23-15.el6_6.2 Dependency Updated: cyrus-sasl.x86_64 0:2.1.23-15.el6_6.2 cyrus-sasl-lib.x86_64 0:2.1.23-15.el6_6.2 Complete!
# ls -l -rw-rw-r--. 1 NONE NONE 157010 May 23 11:21 fping-3.10.tar.gz # tar zxvf fping-3.10.tar.gz # cd fping-3.10 # ./configure # make # make install # make clean
# ls -l -rw-rw-r--. 1 NONE NONE 515581 May 23 11:21 iksemel-1.4.tar.gz # tar zxvf iksemel-1.4.tar.gz # cd iksemel-1.4 # ./configure --prefix=/usr/local/iksemel # make # make install # make clean
2. 安装zabbix
# ls -l -rw-rw-r--. 1 NONE NONE 14851092 May 23 11:26 zabbix-2.4.5.tar.gz # cd zabbix-2.4.5 # ./configure --enable-server --enable-ipv6 --with-postgresql --with-jabber=/usr/local/iksemel/ --with-libxml2 --with-net-snmp --with-ssh2 --with-openipmi --with-ldap --with-libcurl --with-iconv Configuration: Detected OS: linux-gnu Install path: /usr/local Compilation arch: linux Compiler: gcc Compiler flags: -g -O2 -I/usr/local/pgsql/include -I/usr/local/iksemel//include -I/usr/include/libxml2 -I/usr/include/rpm -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/yes/include Enable server: yes Server details: With database: PostgreSQL WEB Monitoring: cURL Native Jabber: yes SNMP: yes IPMI: yes SSH: yes ODBC: no Linker flags: -rdynamic -L/yes/lib -L/usr/local/pgsql/lib -L/usr/local/iksemel//lib -L/usr/lib64 -L/usr/lib -L/usr/lib -L/usr/lib Libraries: -lm -ldl -lrt -lresolv -lpq -liksemel -lxml2 -lnetsnmp -lssh2 -lOpenIPMI -lOpenIPMIposix -lldap -llber -lcurl Enable proxy: no Enable agent: no Enable Java gateway: no LDAP support: yes IPv6 support: yes *********************************************************** * Now run ‘make install‘ * * * * Thank you for using Zabbix! * * <http://www.zabbix.com> * *********************************************************** # make install # make clean
3. 设置zabbix
设置数据库
# su postgres $ psql psql (9.3.6) Type "help" for help. postgres=# create database zabbix; CREATE DATABASE postgres=# \q # psql zabbix < schema.sql # psql zabbix < images.sql # psql zabbix < data.sql
编辑/usr/local/etc/zabbix_server.conf
LogFile=/home/zabbix/zabbix_server.log Range: 4 PidFile=/home/zabbix/zabbix_server.pid DBName=zabbix DBUser=postgres DBPort=5432
时间: 2024-10-14 19:22:18