CactiEZ 上安装个zabbix 2.2.0

之前安装了一个CactiEZ  基于centos6.0系统的,看到硬盘挺大的,浪费了,再搞几个监控玩玩

由于没有centos 6.0的安装ISO ,直接搞了一个CENTOS 6.4 的ISO 做了个本地yum源

 

下载最新的zabbix 2.2.0  编译报错,原来系统都没安装gcc 等

 

 

[root@CactiEZ zabbix-2.2.0]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-3.el6 set to be updated
--> Processing Dependency: libgomp = 4.4.7-3.el6 for package: gcc-4.4.7-3.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-3.el6 for package: gcc-4.4.7-3.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-3.el6 for package: gcc-4.4.7-3.el6.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-3.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-3.el6.x86_64
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.4.7-3.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 set to be updated
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-3.el6 set to be updated
--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-3.el6.x86_64
---> Package glibc-devel.x86_64 0:2.12-1.107.el6 set to be updated
--> Processing Dependency: glibc-headers = 2.12-1.107.el6 for package: glibc-devel-2.12-1.107.el6.x86_64
--> Processing Dependency: glibc = 2.12-1.107.el6 for package: glibc-devel-2.12-1.107.el6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.107.el6.x86_64
---> Package libgcc.x86_64 0:4.4.7-3.el6 set to be updated
---> Package libgomp.x86_64 0:4.4.7-3.el6 set to be updated
--> Running transaction check
--> Processing Dependency: glibc = 2.12-1.7.el6 for package: glibc-common-2.12-1.7.el6.x86_64
---> Package glibc.x86_64 0:2.12-1.107.el6 set to be updated
---> Package glibc-headers.x86_64 0:2.12-1.107.el6 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.107.el6.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.107.el6.x86_64
---> Package mpfr.x86_64 0:2.4.1-6.el6 set to be updated
---> Package ppl.x86_64 0:0.10.2-11.el6 set to be updated
--> Running transaction check
---> Package glibc-common.x86_64 0:2.12-1.107.el6 set to be updated
---> Package kernel-headers.x86_64 0:2.6.32-358.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================= Package                          Arch                     Version                            Repository                Size
=============================================================================Installing:
 gcc                              x86_64                   4.4.7-3.el6                        Server                    10 M
Installing for dependencies:
 cloog-ppl                        x86_64                   0.15.7-1.2.el6                     Server                    93 k
 cpp                              x86_64                   4.4.7-3.el6                        Server                   3.7 M
 glibc-devel                      x86_64                   2.12-1.107.el6                     Server                   974 k
 glibc-headers                    x86_64                   2.12-1.107.el6                     Server                   604 k
 kernel-headers                   x86_64                   2.6.32-358.el6                     Server                   2.3 M
 libgomp                          x86_64                   4.4.7-3.el6                        Server                   118 k
 mpfr                             x86_64                   2.4.1-6.el6                        Server                   157 k
 ppl                              x86_64                   0.10.2-11.el6                      Server                   1.3 M
Updating for dependencies:
 glibc                            x86_64                   2.12-1.107.el6                     Server                   3.8 M
 glibc-common                     x86_64                   2.12-1.107.el6                     Server                    14 M
 libgcc                           x86_64                   4.4.7-3.el6                        Server                   100 k

Transaction Summary
=============================================================================Install       9 Package(s)
Upgrade       3 Package(s)

Total download size: 37 M
Is this ok [y/N]: y

 

 

 

[root@CactiEZ zabbix-2.2.0]# rpm -qa |grep php
php-cli-5.3.2-6.el6.x86_64
php-5.3.2-6.el6.x86_64
php-gd-5.3.2-6.el6.x86_64
php-common-5.3.2-6.el6.x86_64
php-pdo-5.3.2-6.el6.x86_64
php-mysql-5.3.2-6.el6.x86_64

 

./configure -prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl

 

checking for libperfstat 5.2.0.40 fileset... no
checking for libperfstat 5.3.0.60 fileset... no
checking for architecture... linux (linux-gnu)
checking for the linux kernel version... 2.6 family (2.6.32-71.el6.x86_64)
checking for mysql_config... /usr/bin/mysql_config
checking for main in -lmysqlclient... no
configure: error: Not found mysqlclient library

 

yum install mysql-devel 

 

重新configure 还是报错

 

checking for Zabbix server/proxy database selection... ok
checking for multirow insert statements... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gawk... (cached) gawk
checking for curl-config... no
configure: error: Curl library not found

 

 yum install curl-devel  net-snmp-devel

 

重新配置

make && make install

 

mysql下:

create database zabbix;

 

cat database/mysql/schema.sql | mysql   zabbix

cat database/mysql/images.sql | mysql zabbix

cat database/mysql/data.sql | mysql  zabbix

 

要先images.sql 否则导入data.sql 会报错

 

因为默认目录下面已经有cacti了,重建个目录吧,也可以基于端口的虚拟主机

mkdir /var/www/html/zabbix

 

cp -ra frontends/php/* /var/www/html/zabbix/  

 

http://ip/zabbix/setup.php  进行安装操作

 

检查里面不过的 就修改/etc/php.ini

yum install  libxslt

 

rpm -ivh php-bcmath php-mbstring  php-xml自己下载相应版本的rpm包,yum里面的有问题

验证通过后,基本按默认就可以了,同时注意/var/www/html/zabbix/ 权限

 

useradd zabbix

cp misc/init.d/fedora/core5/* /etc/init.d/

vim 修改ZABBIX_BIN="/usr/local/zabbix/sbin/zabbix_server"

保存后,就可以使用/etc/init.d/zabbix_server start 启动了

 

 

 

 

 

 

 

你可能感兴趣的:(2.2.0,CactiEZ,安装个zabbix)