无法远程访问虚拟机中的EM (Oracle Enterprise Manager)

今天安装EM,因为文件系统采用ASM来控制,后面需要输入一些ASM相关的信息。这个ASMSNMP用户是新建,所以设个密码自己记下就行。

Enter the following information:
Database SID: test
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]: 
Password for SYS user: 
Password for DBSNMP user: 
Password for SYSMAN user: 
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]: /u01/app/11.2.0/grid
ASM SID [ +ASM ]: 
ASM port [ 1521 ]: 
ASM username [ ASMSNMP ]: 
ASM user password:

安装完后发现在虚拟机本地可以通过浏览器登陆,但是在宿主机上却不可以登陆。后来突然意识到可能是防火墙的问题,在iptables中添加以下语句开放1158端口。

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1158 -j ACCEPT

然后重启防火墙: /sbin/service iptables restart

在从宿主的浏览器就可以进行访问了。

原文地址:https://www.cnblogs.com/shenfeng/p/4728724.html