电脑在哪里查看教你盗加密的wifi密码码 那个什么属性我是找到了 到安全那步就没有了阿

1653人阅读
zabbix安装与配置
1.安装mysql数据
参见http://blog.csdn.net/weiwangsisoftstone/article/details/
2.创建数据库以及用户
mysql&&CREATE&DATABASE&zabbix&CHARACTER&SET&utf8;
Query&OK,&1&row&affected&(0.02&sec)
mysql&&show&
mysql&&GRANT&ALL&on&zabbix.*&TO&zabbix@'%'&IDENTIFIED&BY&'zabbix';
Query&OK,&0&rows&affected&(0.03&sec)
[root@mysqlmaster&~]#&mysql&-uzabbix&-pzabbix
3.添加操作系统用户:
groupadd&zabbix
useradd&-g&zabbix&zabbix
4.zabbix安装
下载zabbix源码包
/download.php
[root@mysqlmaster&zabbix]#&tar&-zxvf&zabbix-2.4.7.tar.gz&
安装LAMP环境
[root@zabbix&~]#&yum&install&-y&httpd&mysql&mysql-server&mysql-devel&php&php-mysql&php-common&php-mbstring&php-gd&php-odbc&php-xml&php-pear
(由于mysql数据库上面已经安装了,这个可以不安装mysql了mysql&mysql-server&mysql-devel)
安装zabbix所需的组件(server,agent)
[root@zabbix&~]#&yum&install&-y&curl&curl-devel&net-snmp&net-snmp-devel&perl-DBI
编译安装,如果是客户端安装选择--enable-agent就行了。
./configure&--enable-server&--enable-agent&--with-mysql&--with-net-snmp&--with-libcurl
[root@mysqlmaster&zabbix-2.4.7]#&./configure&--enable-server&--enable-agent&--with-mysql&--with-net-snmp&--with-libcurl
checking&for&a&BSD-compatible&install...&/usr/bin/install&-c
checking&whether&build&environment&is&sane...&yes
checking&for&a&thread-safe&mkdir&-p...&/bin/mkdir&-p
checking&for&gawk...&gawk
checking&whether&make&sets&$(MAKE)...&yes
checking&whether&make&supports&nested&variables...&yes
configure:&Configuring&Zabbix&2.4.7
checking&whether&make&sets&$(MAKE)...&(cached)&yes
checking&build&system&type...&x86_64-unknown-linux-gnu
checking&host&system&type...&x86_64-unknown-linux-gnu
checking&for&gcc...&no
checking&for&cc...&no
checking&for&cl.exe...&no
configure:&error:&in&`/home/zabbix/zabbix-2.4.7':
configure:&error:&no&acceptable&C&compiler&found&in&$PATH
See&`config.log'&for&more&details
[root@mysqlmaster&zabbix-2.4.7]#&yum&install&gcc
checking&for&the&linux&kernel&version...&2.6&family&(2.6.32-279.el6.x86_64)
checking&size&of&void&*...&8
checking&for&mysql_config...&/usr/bin/mysql_config
checking&for&main&in&-lmysqlclient...&no
configure:&error:&Not&found&mysqlclient&library
报mysql&library没有安装,我之前已经安装了mysql&server和mysql&client了
[root@mysqlmaster&~]#&rpm&-qa&|grep&MySQL*
MySQL-server-5.6.28-1.el6.x86_64
MySQL-client-5.6.28-1.el6.x86_64
[root@mysqlmaster&~]#&
把mysql其他包也安装上
[root@mysqlmaster&mysqlinstall]#&ls
MySQL-5.6.28-1.el6.x86_64.rpm-bundle.tar&&MySQL-devel-5.6.28-1.el6.x86_64.rpm&&&&&MySQL-server-5.6.28-1.el6.x86_64.rpm&&MySQL-shared-compat-5.6.28-1.el6.x86_64.rpm
MySQL-client-5.6.28-1.el6.x86_64.rpm&&&&&&MySQL-embedded-5.6.28-1.el6.x86_64.rpm&&MySQL-shared-5.6.28-1.el6.x86_64.rpm&&MySQL-test-5.6.28-1.el6.x86_64.rpm
[root@mysqlmaster&mysqlinstall]#&rpm&-ivh&*.rpm
warning:&MySQL-client-5.6.28-1.el6.x86_64.rpm:&Header&V3&DSA/SHA1&Signature,&key&ID&:&NOKEY
Preparing...&&&&&&&&&&&&&&&&###########################################&[100%]
&&&&&&&package&MySQL-devel-5.6.28-1.el6.x86_64&is&already&installed
&&&&&&&package&MySQL-client-5.6.28-1.el6.x86_64&is&already&installed
&&&&&&&package&MySQL-server-5.6.28-1.el6.x86_64&is&already&installed
[root@mysqlmaster&mysqlinstall]#&rpm&-ivh&&MySQL-shared-compat-5.6.28-1.el6.x86_64.rpm&
warning:&MySQL-shared-compat-5.6.28-1.el6.x86_64.rpm:&Header&V3&DSA/SHA1&Signature,&key&ID&:&NOKEY
Preparing...&&&&&&&&&&&&&&&&###########################################&[100%]
&&&1:MySQL-shared-compat&&&&###########################################&[100%]
[root@mysqlmaster&mysqlinstall]#&rpm&-ivh&&MySQL-shared-5.6.28-1.el6.x86_64.rpm&
warning:&MySQL-shared-5.6.28-1.el6.x86_64.rpm:&Header&V3&DSA/SHA1&Signature,&key&ID&:&NOKEY
Preparing...&&&&&&&&&&&&&&&&###########################################&[100%]
&&&1:MySQL-shared&&&&&&&&&&&###########################################&[100%]
[root@mysqlmaster&~]#&rpm&-qa&|grep&MySQL*
MySQL-shared-5.6.28-1.el6.x86_64
MySQL-server-5.6.28-1.el6.x86_64
MySQL-devel-5.6.28-1.el6.x86_64
MySQL-client-5.6.28-1.el6.x86_64
MySQL-shared-compat-5.6.28-1.el6.x86_64
[root@mysqlmaster&~]#&
再次执行configure通过
执行make&install
[root@mysqlmaster&~]#&make&install
编译安装完毕
5.初始化zabbix数据(执行zabbix的sql脚本)
[root@mysqlmaster&mysql]#&pwd
/home/zabbix/zabbix-2.4.7/database/mysql
[root@mysqlmaster&mysql]#&ls
data.sql&&images.sql&&schema.sql
[root@mysqlmaster&mysql]#&mysql&-uzabbix&-pzabbix
Warning:&Using&a&password&on&the&command&line&interface&can&be&insecure.
Welcome&to&the&MySQL&monitor.&&Commands&end&with&;&or&\g.
Your&MySQL&connection&id&is&5
Server&version:&5.6.28-log&MySQL&Community&Server&(GPL)
Copyright&(c)&,&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
Type&''&or&'\h'&for&help.&Type&'\c'&to&clear&the&current&input&statement.
mysql&&use&
Database&changed
mysql&&source&schema.
mysql&&source&images.
mysql&&source&data.
6.设置zabbix为启动服务
[root@mysqlmaster&tru64]#&ls
zabbix_agentd&&zabbix_server
[root@mysqlmaster&tru64]#&pwd
/home/zabbix/zabbix-2.4.7/misc/init.d/tru64
[root@mysqlmaster&tru64]#&cp&zabbix_agentd&/etc/init.d/
[root@mysqlmaster&tru64]#&cp&zabbix_server&/etc/init.d/
[root@mysqlmaster&tru64]#&chmod&+x&/etc/init.d/zabbix_*
添加服务:
[root@mysqlmaster&init.d]#&export&LANG=zh_cn.GB2312
[root@mysqlmaster&init.d]#&chkconfig&--add&zabbix_agentd&
service&zabbix_agentd&does&not&support&chkconfig
报不支持把如下两行添加到zabbix_server和zabbix_agentd中
#chkconfig:&35&95&95
#description:zabbix&Agent&server&
[root@mysqlmaster&init.d]#&chkconfig&--add&zabbix_server
[root@mysqlmaster&init.d]#&chkconfig&--add&zabbix_agentd&
[root@mysqlmaster&init.d]#&chkconfig&zabbix_server&on
[root@mysqlmaster&init.d]#&chkconfig&zabbix_agentd&on
7.修改配置文件
/usr/local/etc
[root@zabbix&etc]#&vi&zabbix_server.conf&#服务端的配置
LogFile=/var/log/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456
[root@zabbix&etc]#&more&zabbix_agentd.conf&#客户端配置
LogFile=/tmp/zabbix_agentd.log
Server=127.0.0.1
启动zabbix
/etc/init.d/zabbix_server&start
8.安装zabbix&web页面
复制php文件将frontends/php下面的php文件拷贝到web服务器html文件目录下面
[root@mysqlmaster&zabbix-2.4.7]#&cp&-r&frontends/php&/var/www/html/zabbix
启动apache服务
[root@mysqlmaster&zabbix-2.4.7]#&/etc/init.d/httpd&restart
Stopping&httpd:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&[&&OK&&]
Starting&httpd:&httpd:&Could&not&reliably&determine&the&server's&fully&qualified&domain&name,&using&192.168.1.100&for&ServerName
8.在浏览器中打开web界面
http://192.168.1.100/zabbix/php/setup.php
修改/etc/php.ini配置文件
post_max_size&=16M
max_execution_time&=300
max_input_time&=300
date.timezone&=&Asia/Shanghai
post_max_size&=&32M
重启apache
[root@mysqlmaster&etc]#&/etc/init.d/httpd&restart
还是报错Php&bcmath&fail
Php&bcmath&fail是因为包没有安装
安装php-bcmath包
[root@mysqlmaster&etc]#&yum&install&php-bcmath*
重启apache点击retry通过
[root@mysqlmaster&etc]#&/etc/init.d/httpd&restart
配置数据库链接,然后test
配置zabbix&server
配置文件生成fail原因是由于权限问题导致,修改权限然后重试通过
&/var/www/html/zabbix/php/conf/zabbix.conf.php&&fail
[root@mysqlmaster&html]#&chown&apache:apache&-R&zabbix/
登陆zabbix,默认用户名:Admin,密码:zabbix
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:435980次
积分:5857
积分:5857
排名:第4038名
原创:216篇
评论:14条
(1)(2)(2)(1)(1)(1)(3)(1)(2)(3)(5)(5)(7)(2)(2)(3)(2)(2)(8)(4)(9)(8)(8)(13)(12)(18)(6)(4)(1)(2)(3)(1)(2)(1)(11)(4)(3)(3)(12)(2)(1)(8)(18)(16)zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。
zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。
本文为大家讲解的是 zabbix监控Oracle数据库的配置方法,感兴趣的同学参考下。
公司业务使用的是一直oracle数据库,老大要求监控表空间剩余大小并且当剩余过小时能够及时报警。刚想出来的方案是通过写脚本获取表空间的数据,通 脚本中使用expect自动输入密码登陆oracle用户然后再登陆数据库查询数据返回给zabbix_server。但是由于脚本运行时间大概12秒左 右,zabbix获取数据总是超时(只是个人理解,如果你有解决方法希望给我留言,谢谢)。在网上搜索中发现zabbix插件-orabbix,原理是通 过orabbix登陆被监控主机oracle数据库,查询数据。个人认为非常好用,包括自定义监控项。唯一的麻烦就是需要在配置文件中添加每一个数据库服 务器ip、数据库用户、密码。
本文主要讲述zabbix通过orabbix插件来监控Oracle。
zabbix简介
zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。
zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。
Orabbix简介
Orabbix是设计用来为zabbix监控Oracle的数据库的插件,它提供多层次的监控,包括可用性和服务器性能的指标。
它提供了从众多Oracle实例采集的有效机制,进而提供此信息的监控和性能指标。然后,您可以利用的zabbix的报告功能为收集的所有数据,并提供分 析。目前的发行版中包含了一组预先定义的模板,包括从初始部署报警和图形功能。然而,这些可以进行微调,以满足您额需求和数据/监控要求。
Orabbix监控的内容
1、数据库版本
2、归档日志与生产趋势
3、触发器,表/过程命中率
4、逻辑IO性能
5、物理IO性能
9、Session
10、数据库大小
11、自定义oracle监控项
实验环境:
操作系统:centos6.5
服务端:192.168.0.119&&& &
客服端(数据库):192.168.0.110
服务端操作
一、安装jre。(确保有Java的环境)
下载地址:& &
# rpm -ivh jre-7u67-linux-x64.rpm&
& &&&Preparing...& && && && && & ########################################### [100%]
& && && &1:jre& && && && && && & ########################################### [100%]
& &&&Unpacking JAR files...
& && && && & rt.jar...
& && && && & jsse.jar...
& && && && & charsets.jar...
& && && && & localedata.jar...
& && && && & jfxrt.jar...
补充:如果不想修改系统配置,我们可以直接下载java压缩包,加压到某个目录,然后修改/orabbix/run.sh脚本,在java前加上完整java路径,如:/usr/java/j2sdk/bin/java&&-Duser.language=en........(省略)
二、安装orabbix&
下载地址:
1)在/opt创建目录创建orabbix文件。(原因:orabbix启动文件默认写在/opt/orabbix目录下,也可以修改一下orabbix启动脚本的路径,启动脚本是/orabbix/init.d/orabbix)& && && &&
#mkdir /opt/orabbix
#mv orabbix-1.2.3.zip /opt/orabbix
#cd /opt/orabbit
#unzip orabbix-1.2.3.zip
2)授予文件可执行的权限
#chmod a+x /opt/orabbix -R
3)创建一个名为config.props文件,有模板可以参考。
#cp /opt/orabbix/conf/config.props.sample config.props
4)修改confi.props配置文件,仅需修改如下内容即可。
# cat /opt/orabbix/conf/config.props |grep -v &#&& &这里仅取没有注释的。
ZabbixServerList=ZabbixServer& && && & #zabbix名称
ZabbixServer.Address=192.168.0.119& &&&#zabbix服务端的IP地址
ZabbixServer.Port=10051& && && && && & #zabbix服务端的端口
OrabbixDaemon.PidFile=./logs/orabbix.pid
OrabbixDaemon.Sleep=300
OrabbixDaemon.MaxThreadNumber=100
& & #这个名称可以随便起,但是必须跟监控的主机名保持一致(可以添加IP地址)。
DatabaseList.MaxActive=10
DatabaseList.MaxWait=100
DatabaseList.MaxIdle=1
<.Url=jdbc:oracle:thin:@192.168.0.110:1521:rdcms&&# 这里主要是通过JDBC来连接客户端的。rdcms主要是数据库的实例名称。在客户端可以通过select instance_name from v$instance来得到实例的名称。
<.User=zabbix& && &#数据库用户
.Password=zabbix&&#数据库用户密码
.MaxActive=10
.MaxWait=100
.MaxIdle=1
.QueryListFile=./conf/query.props & #监控项定义文件,后面我们添加自定义监控项就是添加到此文件中
5)启动服务和查看进程
#cp -a /opt/orabbix/init.d/orabbix /etc/init.d/orabbix
#/etc/init.d/orabbix start
Starting Orabbix service:
# ps aux |grep orabbix
客户端操作
登录数据库并授予用户相关权限即可。
#su - oracle
#sqlplus /nolog
#conn /as sysdba
create user zabbix identified by &zabbix& default tablespace system temporary tablespace temp profile de
grant crea
alter user zab
grant select on v_$
grant select on dba_
grant select on v_$log_
grant select on v_$
grant select on sys.dba_audit_
grant select on v_$
grant select on dba_
grant select on v_$li
grant select on v_$
grant select on v_$
grant select on v_$
grant select on v_$
grant select on v_$
grant select on v_$li
grant select on v_$
grant select on dba_data_
grant select on dba_temp_
grant select on dba_free_
grant select on v_$sysem_
服务端操作
1、导入模板。模板在/opt/orabbix/template.
Orabbix_export_full.xml 全部导入(图表 监控项 触发器)
Orabbix_export_graphs.xml 图表
Orabbix_export_items.xml 监控项
Orabbix_export_triggers.xml 触发器
2、添加主机(名字必须跟config.props里面定义的名称的配置保持一致)
3、关联模板
4、结果演示
Zabbix通过Orabbix监控Oracle实验就搭建完成了,有问题的可以留言。
自定义oracle监控项
所有的监控项都在/orabbix/conf/query.props中,我添加三个监控项为例,有两处需要添加:
1、在QueryList中添加键值,就是可以直接在zabbix web填写的键值。
2、数据库中可以直接执行的查询命令,注意键值后面要添加&.Query&,不需要&;&结尾。
如:robots_website_all.Query=select count(*) from robots_website
3、OK!服务器上配置完成,登陆zabbix web界面对主机新建监控项即可。
Copyright &
All Rights Reserved &&&&&&&centos上安装 zabbix+& 15:19:11
centos上安装 zabbix+oracle
zabbix需求
Requirements
Zabbix is built around modern Apache WEB server, leading
engines, and the PHP scripting language.
The following software is required to run Zabbix:
Software&&Comments
Apache&1.3.12 or later
PHP&5.0 or later
PHP modules:&php-gd&GD 2.0 or later&PHP GD module must support PNG images.
PHP TrueType support&--with-ttf
PHP bc support&php-bcmath, --enable-bcmath
PHP XML support&php-xml or php5-dom, if provided as a separate
by the distributor
PHP session support&php-session, if provided as a separate package by the distributor
PHP socket support&php-net-socket, --enable-sockets. Required for user script support.
PHP multibyte support&php-mbstring, --enable-mbstring
IBM DB2&ibm_db2&Required if IBM DB2 is used as Zabbix back end database.
&php-mysql&3.22 or later&Required if MySQL is used as Zabbix back end database.
Oracle&oci8&Required if Oracle is used as Zabbix back-end database.
PostgreSQL&php-pgsql&7.0.2 or later if Zabbix & 1.8.9&7.4 or later if Zabbix &= 1.8.9&Required if PostgreSQL is used as Zabbix back-end database.&Consider using PostgreSQL 8.x or later for much better performance.&It is suggested to use at least PostgreSQL 8.3, which&introduced much better VACUUM performance.
SQLite&php-sqlite3&3.3.5 or later&Required if SQLite is used as Zabbix back-end database.
create tablespace zabbix datafile '+ASM1/momorac/datafile/zabbix1.bdf' size 500M autoextend on next 50m maxsize 4096M;&Alter Profile Default Limit Failed_Login_Attempts U&Alter Profile Default Limit Password_Life_Time U&Create User Zabbix Identified By 111111 Default Tablespace Z&Grant Connect To Z&Grant Resouse To Z&Grant Unlimited Tablespace To Z
grant create any DIRECTORY
--临时授权
安装oracle即时
数据库和zabbix没在同一台主机上,所以需要安装oracle即时客户端,也可以是oracle的客户端。只不过客户端比较庞大。
下载Oracle即时客户端包
/tech/database/features/instant-client/index-097480.html
数据库版本是11.2.0.3.0
Instant Client Package - Basic:
All files required to run OCI, OCCI, and JDBC-OCI applications
&instantclient-basic-linux.x64-11.2.0.3.0.zip&(60,331,694 bytes) (cksum - )
oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm&(59,492,344 bytes) (cksum - )&*Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client
instantclient-sqlplus-linux.x64-11.2.0.3.0.zip&(837,574 bytes) (cksum - )
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm&(831,586 bytes) (cksum - )
*Instant Client Package - SDK:
Additional header files and an example makefile for developing Oracle applications with Instant Client
instantclient-sdk-linux.x64-11.2.0.3.0.zip&(641,586 bytes) (cksum - )
oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm&(609,139 bytes) (cksum - )
zip 或者 rpm 包选择一种,系统是centos,天生兼容RHEL,所以选择rpm格式的。
以64位为例,下载以下几个文件:
oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm
下载完以后装上。 rpm -Uhv
[root@my2950 zabbix]# rm -f oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm&ll -h&total 71M&-rw-r--r--& 1 root root& 57M Jun& 9 09:39 oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64(1).rpm&-rw-r--r--& 1 root root 595K Jun& 8 18:01 oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm&-rw-r--r--& 1 root root 813K Jun& 8 18:01 oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm&drwxrwxr-x 13 .0K Jun& 8 17:11 zabbix-2.0.6&-rw-r--r--& 1 root root& 13M Apr 22 20:34 zabbix-2.0.6.tar.gz&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -Uhv oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64\(1\).rpm&99%)########################################### [100%]&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -Uhv oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm&Preparing...&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (100%)#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (100%)##&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 99%)########################################### [100%]&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -Uhv oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm sqlplus-11.2.0.3.0-1.x86_64.rpm&Preparing...&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (100%)#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (100%)##&&&&
(100%)########################################### [100%]&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -qa|grep oracle&oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64&oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64&oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64&[root@my2950 zabbix]#&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -ql oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64&/usr/lib/oracle/11.2/client64/bin/adrci&/usr/lib/oracle/11.2/client64/bin/genezi&/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1&/usr/lib/oracle/11.2/client64/lib/libnnz11.so&/usr/lib/oracle/11.2/client64/lib/libocci.so.11.1&/usr/lib/oracle/11.2/client64/lib/libociei.so&/usr/lib/oracle/11.2/client64/lib/libocijdbc11.so&/usr/lib/oracle/11.2/client64/lib/ojdbc5.jar&/usr/lib/oracle/11.2/client64/lib/ojdbc6.jar&/usr/lib/oracle/11.2/client64/lib/xstreams.jar&[root@my2950 zabbix]#&[root@my2950 zabbix]#&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm =-ql oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64&/usr/include/oracle/11.2/client64/ldap.h&/usr/include/oracle/11.2/client64/nzerror.h&/usr/include/oracle/11.2/client64/nzt.h&/usr/include/oracle/11.2/client64/occi.h&/usr/include/oracle/11.2/client64/occiAQ.h&/usr/include/oracle/11.2/client64/occiCommon.h&/usr/include/oracle/11.2/client64/occiControl.h&/usr/include/oracle/11.2/client64/occiData.h&/usr/include/oracle/11.2/client64/occiObjects.h&/usr/include/oracle/11.2/client64/oci.h&/usr/include/oracle/11.2/client64/oci1.h&/usr/include/oracle/11.2/client64/oci8dp.h&/usr/include/oracle/11.2/client64/ociap.h&/usr/include/oracle/11.2/client64/ociapr.h&/usr/include/oracle/11.2/client64/ocidef.h&/usr/include/oracle/11.2/client64/ocidem.h&/usr/include/oracle/11.2/client64/ocidfn.h&/usr/include/oracle/11.2/client64/ociextp.h&/usr/include/oracle/11.2/client64/ocikpr.h&/usr/include/oracle/11.2/client64/ocixmldb.h&/usr/include/oracle/11.2/client64/ocixstream.h&/usr/include/oracle/11.2/client64/odci.h&/usr/include/oracle/11.2/client64/oratypes.h&/usr/include/oracle/11.2/client64/ori.h&/usr/include/oracle/11.2/client64/orid.h&/usr/include/oracle/11.2/client64/orl.h&/usr/include/oracle/11.2/client64/oro.h&/usr/include/oracle/11.2/client64/ort.h&/usr/include/oracle/11.2/client64/xa.h&/usr/lib/oracle/11.2/client64/lib/libclntsh.so&/usr/lib/oracle/11.2/client64/lib/libocci.so&/usr/lib/oracle/11.2/client64/lib/ottclasses.zip&/usr/share/oracle/11.2/client64/cdemo81.c&/usr/share/oracle/11.2/client64/demo.mk&/usr/share/oracle/11.2/client64/occidemo.sql&/usr/share/oracle/11.2/client64/occidemod.sql&/usr/share/oracle/11.2/client64/occidml.cpp&/usr/share/oracle/11.2/client64/occiobj.cpp&/usr/share/oracle/11.2/client64/occiobj.typ&/usr/share/oracle/11.2/client64/ott&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -ql oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64basic-11.2.0.3.0-1.x86_64&a|grep oracle&oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64&oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64&oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64&[root@my2950 zabbix]#&[root@my2950 zabbix]#&[root@my2950 zabbix]# rpm -qa|grep oraclel oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64basic-11.2.0.3.0-1.x86_64oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64&/usr/bin/sqlplus64&/usr/lib/oracle/11.2/client64/bin/sqlplus&/usr/lib/oracle/11.2/client64/lib/glogin.sql&/usr/lib/oracle/11.2/client64/lib/libsqlplus.so&/usr/lib/oracle/11.2/client64/lib/libsqlplusic.so&[root@my2950 zabbix]# cd /usr/lib//oracle/11.2/client64/&bin/ lib/&[root@my2950 zabbix]# cd /usr/lib/oracle/11.2/client64/&[root@my2950 client64]# ls&bin& lib&[root@my2950 client64]#&[root@my2950 client64]#&[root@my2950 client64]#&[root@my2950 client64]# tree&.&bin&&& adrci&&& genezi&&& sqlplus&lib&&&&& glogin.sql&&&&& libclntsh.so -& libclntsh.so.11.1&&&&& libclntsh.so.11.1&&&&& libnnz11.so&&&&& libocci.so -& libocci.so.11.1&&&&& libocci.so.11.1&&&&& libociei.so&&&&& libocijdbc11.so&&&&& libsqlplusic.so&&&&& libsqlplus.so&&&&& ojdbc5.jar&&&&& ojdbc6.jar&&&&& ottclasses.zip&&&&& xstreams.jar&2 directories, 17 files&[root@my2950 client64]# ls&bin& lib&[root@my2950 client64]#&[root@my2950 client64]#&[root@my2950 client64]# ls lib/&glogin.sql&&& libclntsh.so.11.1& libocci.so&&&&&& libociei.so&&&&& libsqlplusic.so& ojdbc5.jar& ottclasses.zip&libclntsh.so& libnnz11.so&&&&&&& libocci.so.11.1& libocijdbc11.so& libsqlplus.so&&& ojdbc6.jar& xstreams.jar&[root@my2950 client64]#
[root@my2950 client64]# pwd&/usr/lib/oracle/11.2/client64&[root@my2950 client64]# cd bin/&[root@my2950 bin]#&[root@my2950 bin]# ./sqlplus&./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory&[root@my2950 bin]#
添加 Oracle libraries
[root@my2950 zabbix-2.0.6]# more /etc/ld.so.conf.d/oracle.conf&/usr/lib/oracle/11.2/client64/lib&[root@my2950 zabbix-2.0.6]#
[root@my2950 bin]# ldconfig&[root@my2950 bin]# ./sqlplus&SQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 9 10:24:26 2013&Copyright (c) , Oracle.& All rights reserved.&Enter user-name:&ERROR:&ORA-12162: TNS:net service name is incorrectly specified&Enter user-name: ^C&[root@my2950 bin]#
测试一下:
[root@my2950 oracle]# sqlplus zabbix/.101.5.77/MOMORAC.momo.org&SQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 9 12:21:29 2013&Copyright (c) , Oracle.& All rights reserved.&Connected to:&Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production&With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,&OLAP, Data Mining, Oracle Database Vault and Real Application Testing options&SQL&
初始化 oracle 数据库
[root@my2950 oracle]# groupadd -g 2000 zabbix&[root@my2950 oracle]# useradd -g zabbix -u 2000 zabbix&[root@my2950 oracle]# id zabbix&uid=2000(zabbix) gid=2000(zabbix) groups=2000(zabbix)&[root@my2950 oracle]#
[root@my2950 oracle]# groupadd -g 2000 zabbix&[root@my2950 oracle]# useradd -g zabbix -u 2000 zabbix&[root@my2950 oracle]# id zabbix&uid=2000(zabbix) gid=2000(zabbix) groups=2000(zabbix)&[root@my2950 oracle]#
[root@my2950 oracle]# pwd&/root/zabbix/zabbix-2.0.6/database/oracle&[root@my2950 oracle]# ll&total 820&-rw-rw-r-- 1 8094 Apr 22 20:32 data.sql&-rw-rw-r-- 1 & 14861 Apr 22 20:31 images.sql&-rw-rw-r-- 1 & 92598 Apr 22 20:32 schema.sql
运行顺序 schema.sql --&& images.sql --& data.sql
前两个需要sql需要处理一下 schema.sql 需要把2048替换成2000
下 vi 打开 :%s//g 或者 sed -i 's//g' schema.sql
images.sql& 需要把/home/zabbix/zabbix/create/output_png 换成自己的目录,当然也可以创建这个目录然后把什么的拷贝进去
处理一下 images.sql&sed -i 's%/home/zabbix/zabbix/create/output_png%/home/zabbix/%g' images.sql
[root@my2950 oracle]#
[root@my2950 oracle]# sqlplus zabbix/.101.5.77/MOMORAC.momo.org&SQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 9 12:21:29 2013&Copyright (c) , Oracle.& All rights reserved.&Connected to:&Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production&With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,&OLAP, Data Mining, Oracle Database Vault and Real Application Testing options&SQL&&
SQL& @image.sql&SP2-0310: unable to open file "image.sql"&SQL& host pwd&/root/zabbix/zabbix-2.0.6/database/oracle&SQL& host ls&data.sql& images.sql& schema.sql&SQL& @images.sql&CREATE OR REPLACE DIRECTORY image_dir AS '/home/zabbix/zabbix/create/output_png'&*&ERROR at line 1:&ORA-01031: insufficient privileges&Procedure created.&BEGIN&*&ERROR at line 1:&ORA-22285: non-existent directory or file for FILEOPEN operation&ORA-06512: at "SYS.DBMS_LOB", line 805&ORA-06512: at "ZABBIX.LOAD_IMAGE", line 8&ORA-06512: at line 2&Procedure dropped.&DROP DIRECTORY image_dir&*&ERROR at line 1:&ORA-01031: insufficient privileges&SQL&
17上创建个逻辑卷通过nfs共享出去,供zabbix使用
[root@my2950 oracle]# lvcreate -L 5G -n zabbix_share datavg&
& Logical volume "zabbix_share" created&
[root@my2950 oracle]# mkfs&
mkfs&&&&&&&&& mkfs.cramfs&& mkfs.ext3&&&& mkfs.ext4dev& mkfs.vfat&&&&&
mkfs.btrfs&&& mkfs.ext2&&&& mkfs.ext4&&&& mkfs.msdos&&& mkfs.xfs&&&&&&
[root@my2950 oracle]# mkfs.xfs /dev/datavg/zabbix_share&
meta-data=https://my.oschina.net/dev/datavg/zabbix_share isize=256
agcount=4, agsize=327680 blks
&&&&&&&& =&&&&&&&&&&&&&&&&&&&&&& sectsz=512&& attr=2&
data&&&& =&&&&&&&&&&&&&&&&&&&&&& bsize=4096&& blocks=1310720, imaxpct=25&
&&&&&&&& =&&&&&&&&&&&&&&&&&&&&&& sunit=0&&&&& swidth=0 blks&
naming&& =version 2&&&&&&&&&&&&& bsize=4096&& ascii-ci=0&
log&&&&& =internal log&&&&&&&&&& bsize=4096&& blocks=2560, version=2&
&&&&&&&& =&&&&&&&&&&&&&&&&&&&&&& sectsz=512&& sunit=0 blks, lazy-count=1&
realtime =none&&&&&&&&&&&&&&&&&& extsz=4096&& blocks=0, rtextents=0&
[root@my2950 oracle]#
[root@my2950 oracle]# vi /etc/fstab&&
/dev/datavg/zabbix_share&&&&&&&&&&&&& /home/zabbix&&&&&&&&&&&&&& xfs&&& defaults&&&&&&& 1 2&
[root@my2950 oracle]# mount /home/zabbix&
[root@my2950 oracle]#&
[root@my2950 oracle]# chown -R
/home/zabbix&
[root@my2950 oracle]# chmod -R 777 /home/zabbix&
[root@my2950 oracle]#
rac& 三个节点分别mount nfs,然后分别创建 zabbix 用户.(通过SCAN ip 访问后端RAC,不知道会落在那个节点上,所以三个节点都需要同样的访问权限。)
mkdir -p /home/ chmod -R 777 /home/
/etc/fstab 添加:
my2950.momo.org:/home/zabbix /home/zabbix&&&&&&&& nfs&&&& rw,bg,hard,nointr,tcp,vers=3,timeo=300,rsize=32768,wsize=32768,actimeo=0& 0 0
groupadd -g 2000useradd -g 2000 -u 2000
grant create any DIRECTORY 再试
Grant Connect To Z&
Grant Resource To Z&
Grant Unlimited Tablespace To Z&
Grant Create any Directory To Z&
schema.sql&
&@sehema.sql&
Directory created.&
Procedure created.&
ERROR at line 1:&
ORA-22288: file or LOB operation FILEOPEN failed&
No such file or directory&
ORA-06512: at "SYS.DBMS_LOB", line 805&
ORA-06512: at "ZABBIX.LOAD_IMAGE", line 8&
ORA-06512: at line 2&
Procedure dropped.&
Directory dropped.&
[zabbix@node2 ~]$ mkdir -p /home/zabbix/zabbix/create/output_png&
[zabbix@node2 ~]$ ls -l /home/zabbix/zabbix/create/output_png&
[zabbix@node2 ~]$ ls -l /home/zabbix/zabbix/create/&
drwxr-xr-x 2 zabbix zabbix 6 Jun& 9 14:27 output_png&
[zabbix@node2 ~]$
然后把 源码目录下的 ./misc/images/png_modern 拷贝到 /home/zabbix 下
[root@my2950 zabbix-2.0.6]# pwd&
/root/zabbix/zabbix-2.0.6&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]# find ./ -name Workstation_(128).png -print&
-bash: syntax error near unexpected token `('&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]# find ./ -name Workstation_*png -print&&&&&&
./frontends/php/images/sysmaps/Workstation_small.png&
./misc/images/png_modern/Workstation_(48).png&
./misc/images/png_modern/Workstation_(128).png&
./misc/images/png_modern/Workstation_(24).png&
./misc/images/png_modern/Workstation_(64).png&
./misc/images/png_modern/Workstation_(96).png&
./misc/images/png_classic/Workstation_small.png&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]# cd misc/images/&
[root@my2950 images]# ls&
png_classic& png_modern& png_to_xml.sh& README&
[root@my2950 images]# cd png_modern/&
[root@my2950 png_modern]# pwd&
/root/zabbix/zabbix-2.0.6/misc/images/png_modern
[root@my2950 png_modern]# pwd&
/root/zabbix/zabbix-2.0.6/misc/images/png_modern&
[root@my2950 png_modern]# cd ../&
[root@my2950 images]# cp -r png_modern /home/zabbix/&
.bash_history& .bash_logout&& .bash_profile& .bashrc&&&&&&& .kshrc&&&&&&&& .viminfo&&&&&& .vimrc&&&&&&&& zabbix/&
[root@my2950 images]# cp -r png_modern /home/zabbix/&
[root@my2950 images]# ls -l /home/zabbix/&
drwxr-xr-x 2 root&& root&& 8192 Jun& 9 14:41&
png_modern&
drwxr-xr-x 3 zabbix zabbix&& 19 Jun& 9 14:27 zabbix&
[root@my2950 images]# chown -R zabbix:zabbix /home/zabbix&
zabbix/&&&&& zabbix.orig/&
[root@my2950 images]# chown -R zabbix:zabbix /home/zabbix/png_modern&
[root@my2950 images]#&
[root@my2950 images]#
&@images.sql&
Directory created.&
Procedure created.&
PL/SQL procedure successfully completed.&
Procedure dropped.&
Directory dropped.&
Change table “items” column “description” from nclob to nvarchar(2000) due to zabbixbug&
/browse/ZBX-4239
SQL& alter table items add(new_description nvarchar2(2000));&
Table altered.&
items set new_description = DESCRIPTION;&
0 rows updated.&
SQL& alter table items drop column DESCRIPTION;&
Table altered.&
SQL& alter table items rename column new_description to DESCRIPTION;&
Table altered.&
&&&&&&& SQL&@data.sql
编译安装 zabbix
[root@my2950 ~]# mkdir zabbix
[root@my2950 ~]#
[root@my2950 ~]#
[root@my2950 ~]#
[root@my2950 ~]# cd zabbix/
[root@my2950 zabbix]# ls
[root@my2950 zabbix]#
[root@my2950 zabbix]#
[root@my2950 zabbix]#
[root@my2950 zabbix]# wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX
-- 17:02:34--& http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%2
Resolving jaist.dl.sourceforge.net... 150.65.7.130, :feed::feed
Connecting to jaist.dl.sourceforge.net|150.65.7.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: M) [application/x-gzip]
Saving to: “zabbix-2.0.6.tar.gz”
97% [===========================================================================&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ========================================================&&&& ] 13,052,328&& 168K&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 100%[======================================&] 13,402,400&& 143K/s&& in 59s
17:03:33 (223 KB/s) - “zabbix-2.0.6.tar.gz” saved [02400]
[root@my2950 zabbix]#
编译 zabbix :
./configure --prefix/usr/local/zabbix --enable-server --with-oracle=/usr/lib/oracle/11.2/client64 --with-net-snmp --with-jabber --with-libcurl
config.status: creating include/config.h&config.status: executing depfiles s&类似下边的结果意味着编译成功通过
config.status: executing depfiles commands&Configuration:&& Detected OS:&&&&&&&&&& linux-gnu&& Install path:&&&&&&&&& /usr/local&& Compilation arch:&&&&& linux&& Compiler:&&&&&&&&&&&&& gcc&& Compiler flags:&&&&&&& -g -O2&& -I/usr/lib/oracle/11.2/client64/rdbms/public -I/usr/lib/oracle/11.2/client64/rdbms/demo&&&&& -I/usr/include/rpm -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include& -I/usr/include&& Enable server:&&&&&&&& yes&& Server details:&&&& With database:&&&&&&&& Oracle&&&& WEB Monitoring via:&&& cURL&&&& Native Jabber:&&&&&&&& yes&&&& SNMP:&&&&&&&&&&&&&&&&& net-snmp&&&& IPMI:&&&&&&&&&&&&&&&&& no&&&& SSH:&&&&&&&&&&&&&&&&&& yes&&&& ODBC:&&&&&&&&&&&&&&&&& no&&&& Linker flags:&&&&&&&&& -rdynamic&&&&& -L/usr/lib/oracle/11.2/client64/lib&&&&& -L/usr/lib64& -L/usr/lib64 -L/usr/lib&&&& Libraries:&&&&&&&&&&&& -lm -lrt& -lresolv&&&& -lclntsh -lnnz11&& -liksemel& -lcurl& -lnetsnmp -lcrypto& -lnetsnmp -lcrypto -lssh2&& Enable proxy:&&&&&&&&& no&& Enable agent:&&&&&&&&& no&& Enable
gateway:&& no&& LDAP support:&&&&&&&&& no&& IPv6 support:&&&&&&&&& no&***********************************************************&*&&&&&&&&&&& Now run 'make install'&&&&&&&&&&&&&&&&&&&&&& *&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *&*&&&&&&&&&&& Thank you for using Zabbix!&&&&&&&&&&&&&&&&& *&*&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&& *&***********************************************************
[root@my2950 zabbix-2.0.6]#
可能会遇到的错误:
checking for net-snmp-config... no&configure: error: Invalid NET-SNMP directory - unable to find net-snmp-config&[root@my2950 zabbix-2.0.6]#
解决: yum install net-snmp-devel
checking for localname in struct snmp_session... yes&
checking for SSH2 support... no&
configure: error: SSH2 library not found&
[root@my2950 zabbix-2.0.6]#
解决:[root@my2950 zabbix-2.0.6]# yum install php-pecl-ssh2.x86_64 libssh2-devel.x86_64
安装 checkinstall
ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/andnagy/RedHat_RHEL-6/x86_64/checkinstall-1.6.2-20.2.x86_64.rpm
[root@my2950 zabbix-2.0.6]# rpm -Uhv checkinstall-1.6.2-20.2.x86_64.rpm&
warning: checkinstall-1.6.2-20.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73a77345: NOKEY&
Preparing...&&&&&&&&&&&&&&& ########################################### [100%]&
&& 1:checkinstall&&&&&&&&&& ########################################### [100%]&
[root@my2950 zabbix-2.0.6]#
configure && make 之后使用 checkinstall
name 修改成 zabbix-server-oracle
/bin/mkdir: cannot create directory `/usr/local/share/zabbix': No such file or directory&
make[5]: *** [install-data-hook] Error 1&
make[5]: Leaving directory `/root/zabbix/zabbix-2.0.6/src/zabbix_server'&
make[4]: *** [install-data-am] Error 2&
make[4]: Leaving directory `/root/zabbix/zabbix-2.0.6/src/zabbix_server'&
make[3]: *** [install-am] Error 2&
make[3]: Leaving directory `/root/zabbix/zabbix-2.0.6/src/zabbix_server'&
make[2]: *** [install-recursive] Error 1&
make[2]: Leaving directory `/root/zabbix/zabbix-2.0.6/src/zabbix_server'&
make[1]: *** [install-recursive] Error 1&
make[1]: Leaving directory `/root/zabbix/zabbix-2.0.6/src'&
make: *** [install-recursive] Error 1&
****& Installation failed. Aborting package creation.&
Cleaning up...OK&
[root@my2950 zabbix-2.0.6]#
[root@my2950 zabbix-2.0.6]# ll /usr/local/share/zabbix&
ls: cannot access /usr/local/share/zabbix: No such file or directory&
[root@my2950 zabbix-2.0.6]# mkdir -p /usr/local/share/zabbix&
[root@my2950 zabbix-2.0.6]#
又有错误:
Building file list...OK&
/root/rpmbuild has no SOURCES directory. Please write the path to&
the RPM source directory tree:
[root@my2950 zabbix-2.0.6]# yum install rpmdevtools
然后运行& rpmdev-setuptree
[root@my2950 zabbix-2.0.6]# rpmdev-setuptree&
[root@my2950 zabbix-2.0.6]#
Copying files to the temporary directory...OK&Stripping ELF binaries and libraries...OK&Compressing man pages...OK&Building file list...OK&Building RPM package...OK&NOTE: The package will not be installed&Erasing temporary files...OK&Deleting temp dir...OK&**********************************************************************&Done. The new package has been saved to&/root/rpmbuild/RPMS/x86_64/zabbix-server-oracle-2.0.6-1.x86_64.rpm&You can install it in your
anytime using:&&&&&& rpm -i zabbix-server-oracle-2.0.6-1.x86_64.rpm&**********************************************************************&[root@my2950 zabbix-2.0.6]#
[root@my2950 zabbix-2.0.6]# cp /root/rpmbuild/RPMS/x86_64/zabbix-server-oracle-2.0.6-1.x86_64.rpm /root/zabbix/&[root@my2950 zabbix-2.0.6]# cd /root/zabbix/&[root@my2950 zabbix]# ll&total 73052&-rw-r--r--& 1 root root
Jun& 9 09:39 oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64(1).rpm&-rw-r--r--& 1 root root&& 609139 Jun& 8 18:01 oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm&-rw-r--r--& 1 root root&& 831586 Jun& 8 18:01 oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm&drwxrwxr-x 14 &&&& 4096 Jun& 9 16:41 zabbix-2.0.6&-rw-r--r--& 1 root root
Apr 22 20:34 zabbix-2.0.6.tar.gz&-rw-r--r--& 1 root root&& 450757 Jun& 9 16:42 zabbix-server-oracle-2.0.6-1.x86_64.rpm&[root@my2950 zabbix]# rpm -Uhv zabbix-server-oracle-2.0.6-1.x86_64.rpm&error: Failed dependencies:&&&&&&&& libclntsh.so.11.1()(64bit) is needed by zabbix-server-oracle-2.0.6-1.x86_64&&&&&&&& libnnz11.so()(64bit) is needed by zabbix-server-oracle-2.0.6-1.x86_64&[root@my2950 zabbix]# rpm -Uhv zabbix-server-oracle-2.0.6-1.x86_64.rpm --nodeps&Preparing...&&&&&&&&&&&&&&& ########################################### [100%]&&& 1:zabbix-server-oracle&& ########################################### [100%]&[root@my2950 zabbix]#
======================== Installation successful ==========================&
Copying documentation directory...&
./INSTALL&
./AUTHORS&
./ChangeLog&
./COPYING&
Copying files to the temporary directory...OK&
Stripping ELF binaries and libraries...OK&
Compressing man pages...OK&
Building file list...OK&
Building RPM package...OK&
NOTE: The package will not be installed&
Erasing temporary files...OK&
Deleting temp dir...OK&
**********************************************************************&
Done. The new package has been saved to&
/root/rpmbuild/RPMS/x86_64/zabbix-2.0.6-1.x86_64.rpm&
You can install it in your system anytime using:&
&&&&& rpm -i zabbix-2.0.6-1.x86_64.rpm&
**********************************************************************&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]# cp /root/rpmbuild/RPMS/x86_64/zabbix-2.0.6-1.x86_64.rpm ./&
安装 zabbix
[root@my2950 zabbix-2.0.6]# rpm -Uhv zabbix-2.0.6-1.x86_64.rpm&
error: Failed dependencies:&
&&&&&&& libclntsh.so.11.1()(64bit) is needed by zabbix-2.0.6-1.x86_64&
&&&&&&& libnnz11.so()(64bit) is needed by zabbix-2.0.6-1.x86_64&
[root@my2950 zabbix-2.0.6]#
修改 /etc/profile
export ORACLE_HOME=/usr/lib/oracle/11.2/client64&
export ORACLE_BASE=/usr/lib/oracle&
export PATH=$PATH:$ORACLE_HOME/bin&
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
[root@my2950 zabbix-2.0.6]# rpm -Uhv zabbix-2.0.6-1.x86_64.rpm&
error: Failed dependencies:&
&&&&&&& libclntsh.so.11.1()(64bit) is needed by zabbix-2.0.6-1.x86_64&
&&&&&&& libnnz11.so()(64bit) is needed by zabbix-2.0.6-1.x86_64&
[root@my2950 zabbix-2.0.6]# rpm -Uhv zabbix-2.0.6-1.x86_64.rpm --nodeps&
Preparing...&&&&&&&&&&&&&&& ########################################### [100%]&
&& 1:zabbix&&&&&&&&&&&&&&&& ########################################### [100%]&
[root@my2950 zabbix-2.0.6]#&
[root@my2950 zabbix-2.0.6]# rpm -ql zabbix&
/usr/doc/zabbix&
/usr/doc/zabbix/AUTHORS&
/usr/doc/zabbix/COPYING&
/usr/doc/zabbix/ChangeLog&
/usr/doc/zabbix/INSTALL&
/usr/doc/zabbix/NEWS&
/usr/doc/zabbix/README&
/usr/local&
/usr/local/etc&
/usr/local/etc/zabbix_server.conf&
/usr/local/sbin&
/usr/local/sbin/zabbix_server&
/usr/local/share&
/usr/local/share/man&
/usr/local/share/man/man8&
/usr/local/share/man/man8/zabbix_server.8.gz&
[root@my2950 zabbix-2.0.6]#
安装oci8,php访问oracle需要用到
wget ftp://ftp.pbone.net/mirror//enterprise/6/olds/x86_64/php-oci8-5.3.19-1.el6.remi.x86_64.rpm
[root@my2950 conf.d]#
[root@my2950 conf.d]#
[root@my2950 conf.d]# rpm -Uhv php-oci8-5.3.19-1.el6.remi.x86_64.rpm
warning: php-oci8-5.3.19-1.el6.remi.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
error: Failed dependencies:
&&&&&&&& php-pdo(x86-64) = 5.3.19-1.el6.remi is needed by php-oci8-5.3.19-1.el6.remi.x86_64
[root@my2950 conf.d]# rpm -qa|grep php-pdo
php-pdo-5.3.3-22.el6.x86_64
[root@my2950 conf.d]# rpm -Uhv php-oci8-5.3.19-1.el6.remi.x86_64.rpm& --nodeps
warning: php-oci8-5.3.19-1.el6.remi.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing...&&&&&&&&&&&&&&& ########################################### [100%]
&&& 1:php-oci8&&&&&&&&&&&&&& ########################################### [100%]&
[root@my2950 conf.d]#
Installing zabbix repository configuration package
rpm&-ivh&/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm
[root@my2950 oracle]#& yum --enablerepo=zabbix search zabbix
zabbix.x86_64 : zabbix with oracle&zabbix-agent.x86_64 : Zabbix Agent&zabbix-get.x86_64 : Zabbix Get&zabbix-java-gateway.x86_64 : Zabbix java gateway&zabbix-proxy.x86_64 : Zabbix Proxy&zabbix-proxy-mysql.x86_64 : Zabbix proxy compiled to use MySQL&zabbix-proxy-pgsql.x86_64 : Zabbix proxy compiled to use PostgreSQL&zabbix-proxy-sqlite3.x86_64 : Zabbix proxy compiled to use SQLite&zabbix-release.noarch : Zabbix repository configuration&zabbix-sender.x86_64 : Zabbix Sender&zabbix-server.x86_64 : Zabbix server common files&zabbix-server-mysql.x86_64 : Zabbix server compiled to use MySQL&zabbix-server-pgsql.x86_64 : Zabbix server compiled to use PostgresSQL&zabbix-server-sqlite3.x86_64 : Zabbix server compiled to use SQLite&zabbix-web.noarch : Zabbix Web Frontend&zabbix-web-japanese.noarch : Japanese font for Zabbix web frontend&zabbix-web-mysql.noarch : Zabbix web frontend for MySQL&zabbix-web-pgsql.noarch : Zabbix web frontend for PostgreSQL&zabbix-web-sqlite3.noarch : Zabbix web frontend for SQLite&zabbix20-agent.x86_64 : Zabbix Agent&zabbix20-proxy.x86_64 : Zabbix Proxy&zabbix20-proxy-mysql.x86_64 : Zabbix proxy compiled to use MySQL&zabbix20-proxy-pgsql.x86_64 : Zabbix proxy compiled to use PostgreSQL&zabbix20-proxy-sqlite3.x86_64 : Zabbix proxy compiled to use SQLite&zabbix20-server.x86_64 : Zabbix server common files&zabbix20-server-mysql.x86_64 : Zabbix server compiled to use MySQL&zabbix20-server-pgsql.x86_64 : Zabbix server compiled to use PostgresSQL&zabbix20-web.noarch : Zabbix Web Frontend&zabbix20-web-mysql.noarch : Zabbix web frontend for MySQL&zabbix20-web-pgsql.noarch : Zabbix web frontend for PostgreSQL&zabbix20.x86_64 : Open-source monitoring solution for your IT infrastructure&& Name and summary matches only, use "search all" for everything.&[root@my2950 oracle]#
[root@my2950 oracle]#& yum --enablerepo=zabbix install zabbix-get.x86_64 zabbix-sender.x86_64 zabbix-server.x86_64 zabbix20-web.noarch
修改zabbix:
[root@my2950 zabbix]# more zabbix_server.conf|grep ^[^#$]&
ListenPort=10051&
LogFile=/var/log/zabbix/zabbix_server.log&
LogFileSize=10&
DebugLevel=2&
PidFile=/var/run/zabbix/zabbix_server.pid&
DBHost=10.101.5.77&
DBName=MOMORAC.MOMO.ORG&
DBUser=zabbix&
DBPassword=111111&
DBSocket=/var/lib/mysql/mysql.sock&
DBPort=1521&
SNMPTrapperFile=/var/log/snmptt/snmptt.log&
AlertScriptsPath=/usr/lib/zabbix/alertscripts&
ExternalScripts=/usr/lib/zabbix/externalscripts&
[root@my2950 zabbix]#
http://10.101.0.17/zabbix/
编辑& /etc/php.ini
date.timezone = Asia/Shanghai
重启apache,继续
数据库选oracle 点击测试的时候直接白屏
[Sun Jun 09 16:09:26 2013] [error] [client 10.101.5.66] PHP Fatal error:& Call to undefined function zbx_dbstr() in /usr/share/zabbix/include/db.inc.php on line 126, referer:http://10.101.0.17/zabbix/
查看提到的文件 db.inc.php
&&&&&&&&&&&&&&&&&&&&&&& case ZBX_DB_ORACLE:&112&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $connect = '';&113&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if (!empty($DB['SERVER'])) {&114&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $connect = '//'.$DB['SERVER'];&115&116&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if ($DB['PORT'] != '0') {&117&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $connect .= ':'.$DB['PORT'];&118&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&119&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if ($DB['DATABASE']) {&120&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $connect .= '/'.$DB['DATABASE'];&121&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&122&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&123&124&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $DB['DB'] = ociplogon($DB['USER'], $DB['PASSWORD'], $connect);&125&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if ($DB['DB']) {&126&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&DBexecute('ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.zbx_dbstr('. '));&127&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&128&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& else {&129&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $error = 'Error connecting to database';&130&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& $result =&131&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&132&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
替换一下:
DBexecute('ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.zbx_dbstr('. '));&DBexecute('ALTER SESSION SET NLS_NUMERIC_CHARACTERS=",."');
The default user name is&Admin, password&zabbix.
09: [Z3001] connection to database 'MOMORAC.MOMO.ORG' failed: [2013] Lost connection to MySQL server at 'reading initial com&munication packet', system error: 0
[root@my2950 zabbix]# which zabbix_server&/usr/sbin/zabbix_server&[root@my2950 zabbix]# ll /usr/sbin/zabbix_server&lrwxrwxrwx 1 root root 31 Jun& 9 15:16 /usr/sbin/zabbix_server -& /etc/alternatives/zabbix-server&[root@my2950 zabbix]# ll /etc/alternatives/zabbix-server&lrwxrwxrwx 1 root root 29 Jun& 9 15:16 /etc/alternatives/zabbix-server -& /usr/sbin/zabbix_server_mysql&[root@my2950 zabbix]#
[root@my2950 zabbix]# cd /etc/alternatives/zabbix-server&-bash: cd: /etc/alternatives/zabbix-server: Not a directory&[root@my2950 zabbix]# cd /etc/alternatives/&[root@my2950 alternatives]# rpm -ql zabbix-server-oracle-2.0.6-1.x86_64&/usr&/usr/doc&/usr/doc/zabbix-server-oracle&/usr/doc/zabbix-server-oracle/AUTHORS&/usr/doc/zabbix-server-oracle/COPYING&/usr/doc/zabbix-server-oracle/ChangeLog&/usr/doc/zabbix-server-oracle/INSTALL&/usr/doc/zabbix-server-oracle/NEWS&/usr/doc/zabbix-server-oracle/README&/usr/local&/usr/local/sbin&/usr/local/sbin/zabbix_server&/usr/local/share&/usr/local/share/man&/usr/local/share/man/man8&/usr/local/share/man/man8/zabbix_server.8.gz&[root@my2950 alternatives]# ll&total 0&lrwxrwxrwx. 1 root root 10 Aug 28& 2012 ksh -& /bin/ksh93&lrwxrwxrwx. 1 root root 30 Aug 28& 2012 ksh-man -& /usr/share/man/man1/ksh93.1.gz&lrwxrwxrwx& 1 root root 20 Aug 30& 2012 mkisofs -& /usr/bin/genisoimage&lrwxrwxrwx& 1 root root 20 Aug 30& 2012 mkisofs-mkhybrid -& /usr/bin/genisoimage&lrwxrwxrwx& 1 root root 36 Aug 30& 2012 mkisofs-mkisofsman -& /usr/share/man/man1/genisoimage.1.gz&lrwxrwxrwx. 1 root root 26 Aug 28& 2012 mta -& /usr/sbin/sendmail.postfix&lrwxrwxrwx. 1 root root 40 Aug 28& 2012 mta-aliasesman -& /usr/share/man/man5/aliases.postfix.5.gz&lrwxrwxrwx. 1 root root 22 Aug 28& 2012 mta-mailq -& /usr/bin/mailq.postfix&lrwxrwxrwx. 1 root root 38 Aug 28& 2012 mta-mailqman -& /usr/share/man/man1/mailq.postfix.1.gz&lrwxrwxrwx. 1 root root 27 Aug 28& 2012 mta-newaliases -& /usr/bin/newaliases.postfix&lrwxrwxrwx. 1 root root 43 Aug 28& 2012 mta-newaliasesman -& /usr/share/man/man1/newaliases.postfix.1.gz&lrwxrwxrwx. 1 root root 23 Aug 28& 2012 mta-pam -& /etc/pam.d/smtp.postfix&lrwxrwxrwx. 1 root root 22 Aug 28& 2012 mta-rmail -& /usr/bin/rmail.postfix&lrwxrwxrwx. 1 root root 25 Aug 28& 2012 mta-sendmail -& /usr/lib/sendmail.postfix&lrwxrwxrwx. 1 root root 41 Aug 28& 2012 mta-sendmailman -& /usr/share/man/man1/sendmail.postfix.1.gz&lrwxrwxrwx& 1 root root 43 Aug 30& 2012 spice-xpi-client -& /usr/libexec/spice-xpi-client-remote-viewer&lrwxrwxrwx. 1 root root 33 Aug 28& 2012 xinputrc -& /etc/X11/xinit/xinput.d/ibus.conf&lrwxrwxrwx& 1 root root 29 Jun& 9 15:16&zabbix-server -& /usr/sbin/zabbix_server_mysql&lrwxrwxrwx& 1 root root 38 Jun& 9 15:30 zabbix-web-font -& /usr/share/fonts/dejavu/DejaVuSans.ttf&[root@my2950 alternatives]# rm -f zabbix-server&[root@my2950 alternatives]# ln -s /usr/local/sbin/zabbix_server zabbix-server&[root@my2950 alternatives]#
重启zabbix-server 再次查看日志:
[root@my2950 alternatives]# tail -f /var/log/zabbix/zabbix_server.log&09: ****** Enabled features ******&09: SNMP monitoring:&&&&&&&&&& YES&09: IPMI monitoring:&&&&&&&&&&& NO&09: WEB monitoring:&&&&&&&&&&& YES&09: Jabber notifications:&&&&& YES&09: Ez Texting notifications:& YES&09: ODBC:&&&&&&&&&&&&&&&&&&&&&& NO&09: SSH2 support:&&&&&&&&&&&&&& NO&09: IPv6 support:&&&&&&&&&&&&&& NO&09: ******************************&09: server #1 started [configuration syncer #1]&09: server #2 started [db watchdog #1]&09: server #9 started [trapper #1]&09: server #10 started [trapper #2]&09: server #11 started [trapper #3]&09: server #12 started [trapper #4]&09: server #13 started [trapper #5]&09: server #15 started [alerter #1]&09: server #17 started [timer #1]&09: server #14 started [icmp pinger #1]&09: server #16 started [housekeeper #1]&09: server #20 started [history syncer #1]&09: server #18 started [http poller #1]&09: server #21 started [history syncer #2]&09: server #0 started [main process]&09: server #24 started [escalator #1]&09: server #22 started [history syncer #3]&09: server #23 started [history syncer #4]&09: server #25 started [proxy poller #1]&09: server #26 started [self-monitoring #1]&09: server #19 started [discoverer #1]&09: server #6 started [poller #4]&09: server #4 started [poller #2]&09: server #7 started [poller #5]&09: server #3 started [poller #1]&09: server #8 started [unreachable poller #1]&09: server #5 started [poller #3]

我要回帖

更多关于 教你盗加密的wifi密码 的文章

 

随机推荐