curl 7.19.7 系统默认版本,升级该软件版本,否则后面邮件功能会有问题
[root@centos02 application]# rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
Retrieving http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
warning: /var/tmp/rpm-tmp.jSwm5A: Header V3 DSA/SHA1 Signature, key ID b56a8bac: NOKEY
Preparing... ########################################### [100%]
1:city-fan.org-release ########################################### [100%]
[root@centos02 application]# yum install libcurl -y
[root@centos02 application]# curl -V 再次查看版本
curl 7.50.1 (x86_64-redhat-linux-gnu) libcurl/7.50.1 OpenSSL/1.0.1e zlib/1.2.3 c-ares/1.11.0 libidn/1.18 libssh2/1.7.0 nghttp2/1.6.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets Metalink
安装zabbix依赖包
[root@centos02 zabbix-3.0.4]# yum -y install mysql-devel libxml2-devel net-snmp-devel libcurl-devel
[root@centos02 tools]# wget http://ncu.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.4/zabbix-3.0.4.tar.gz
[root@centos02 tools]# tar xf zabbix-3.0.4.tar.gz
[root@centos02 tools]# cd zabbix-3.0.4
[root@centos02 zabbix-3.0.4]# ./configure --prefix=/application/zabbix-server --enable-server --with-mysql --with-net-snmp --with-libcurl --with-libxml2 --enable-agent --enable-proxy
Enable server: yes
Server details:
With database: MySQL
WEB Monitoring: cURL
Native Jabber: no
SNMP: yes
IPMI: no
SSH: no
TLS: no
ODBC: no
Linker flags: -L/usr/lib64/mysql -L/usr/lib64 -rdynamic
Libraries: -lmysqlclient -lxml2 -lnetsnmp -lcurl -lm -ldl -lrt -lresolv
Enable proxy: yes
Proxy details:
With database: MySQL
WEB Monitoring: cURL
SNMP: yes
IPMI: no
SSH: no
TLS: no
ODBC: no
Linker flags: -L/usr/lib64/mysql -L/usr/lib64 -rdynamic
Libraries: -lmysqlclient -lxml2 -lnetsnmp -lcurl -lm -ldl -lrt -lresolv
Enable agent: yes
Agent details:
TLS: no
Linker flags: -rdynamic
Libraries: -lcurl -lm -ldl -lrt -lresolv
Enable Java gateway: no
LDAP support: no
IPv6 support: no
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* *
***********************************************************
[root@centos02 zabbix-3.0.4]# make install
由于zabbix启动脚本路径默认指向的是/usr/local/sbin路径,因此,需要提前建立软链接
[root@centos02 zabbix-3.0.4]# ln -s /application/zabbix-server/sbin/* /usr/local/sbin/
[root@centos02 zabbix-3.0.4]# ln -s /application/zabbix-server/bin/* /usr/local/bin/
生成zabbix的web文件
[root@centos02 zabbix-3.0.4]# mkdir /application/nginx/html/zabbix
[root@centos02 zabbix-3.0.4]# cp -a /tools/zabbix-3.0.4/frontends/php/* /application/nginx/html/zabbix/
手动创建zabbix数据库及授权
[root@centos02 zabbix-3.0.4]# mysql -uroot -p123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.49-log MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database zabbix default charset utf8;
Query OK, 1 row affected (0.16 sec)
mysql> grant all on zabbix.* to zabbix@'localhost' identified by 'zabbix';
Query OK, 0 rows affected (0.16 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.19 sec)