您的位置:首页 > 数据库 > Oracle

em控制台启动报错,Please set ORACLE_UNQNAME to da tabase unique name.

2015-04-01 13:15 369 查看
Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知。nagios可以运行在linux/unix平台之上,同时提供一个可选的基于浏览器的WEB界面以方便管理员查看网络状态,各种系统问题,以及日志等。
1.安装环境。nagios需要apache和php的支持,所以要先安装Apache和php,把php模块装载到apache中,并测试是否正确。如下所示,这是一个测试脚本。另外还需要安装gd-devel-2.0.35-11.el6.x86_64(yum 安装即可)

[root@lys htdocs]# cat index.php<h1>www.a.com</h1><?phpphpinfo(); ?>

2.所需软件包,nagios-4.0.8.tar.gz,nagios-plugins-2.1.1.tar.gz。3.为了后续不影响在浏览器中打开页面测试,我们临时清空iptables规则及临时关闭SElinux。[root@lys ~]# iptables -F 清空iptables规则[root@lys ~]# setenforce 04.新建nagios用户和组
[root@lys ~]# useradd nagios
[root@lys ~]# usermod -M -s /sbin/nologin
[root@lys ~]# groupadd nagios
[root@lys ~]# usermod -G nagios nagios
5.由于我之前就下载好了软件包,所以这里就直接解压缩[root@lys ~]# tar xf nagios-4.0.8.tar.gz
[root@lys nagios]# cd nagios-4.0.8
[root@lys nagios-4.0.8]#
6.进行初始化和建立编译的环境。(特别注意自己的安装路径)[root@lys nagios-4.0.8]#./configure --prefix=/mnt/cellar/nagios/ --with-nagios-user=nagios --with-nagios-group=nagios
[root@lys nagios-4.0.8]# make all[root@lys nagios-4.0.8]# make install //安装二进制文件[root@lys nagios-4.0.8]# make install-init //初始化脚本[root@lys nagios-4.0.8]# make install-config //配置文件的实例[root@lys nagios-4.0.8]#make install-commandmode //设置目录权限完成编译安装后切换到/mnt/cellar/nagios/目录下,可以看到如下目录,说明安装没有问题。
[root@lys nagios-4.0.8]# cd /mnt/cellar/nagios/
[root@lys nagios]# ll
total 28
drwxrwxr-x 2 nagios nagios 4096 Nov 18 16:38 bin
drwxrwxr-x 3 nagios nagios 4096 Nov 18 16:57 etc
drwxr-xr-x 2 root root 4096 Nov 18 15:12 include
drwxrwxr-x 3 nagios nagios 4096 Nov 18 15:12 libexec
drwxrwxr-x 2 nagios nagios 4096 Nov 18 16:38 sbin
drwxrwxr-x 11 nagios nagios 4096 Nov 18 16:38 share
drwxrwxr-x 5 nagios nagios 4096 Nov 18 21:15 var
7.安装nagios的web配置文件
[root@lys nagios-4.0.8]# make install-webconf //nagios的web配置文件
8.使用apache来创建基本的WEB认证方式。新建一个admin用户来管理nagios的web界面,并给与admin用户一个密码。
[root@lys ~]# htpasswd -c /mnt/cellar/nagios/etc/htpasswd.users admin
[root@lys ~]# cat /mnt/cellar/nagios/etc/htpasswd.users
admin:c77K8ehFMuAD6
只有通过认证的admin用户才可以通过WEB访问/mnt/cellar/nagios/share和/mnt/cellar/nagios/sbin下面的内容。

9.nagios之所以强大就是因为它的插件,所以下面就开始安装nagios-plugins-2.1.1.tar.gz
[root@lys ~]# tar xf nagios-plugins-2.1.1.tar.gz
[root@lys ~]#cd nagios-plugins-2.1.1
[root@lys nagios-plugins-2.1.1]#./configure --prefix=/mnt/cellar/nagios/ --with-nagios-user=nagios --with-nagios-group=nagios
[root@lys nagios-4.0.8]# make &&make install
10.所有安装就绪后,检查配置文件的正确性。
[root@lys ~]# /mnt/cellar/nagios/bin/nagios -v /mnt/cellar/nagios/etc/nagios.cfg //如果没有任何报错,那就说明配置文件没有问题。
11.让nagios开机自启动
[root@lys ~]# chkconfig --add nagios
[root@lys ~]# chkconfig nagios on
12.启动nagios[root@lys ~]# service nagios start
[root@lys ~]# service nagios status
nagios (pid 2769) is running...
13.nagios启动后打开浏览器http://192.168.0.109/nagios/如下所示


输入用户名和密码后:

当我进行这里的时候,nagios页面有一个报错:


处理方法:

1.[root@lys ~]# cd /mnt/cellar/nagios/etc/
2.[root@lys etc]# grep "use_authentication" *.cfg
cgi.cfg:use_authentication=1
3.[root@lys etc]#vi cgi.cfg
use_authentication=1 #把1修改为0,保存即可
4.重启nagios服务即可。


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐