RH+Oracle安装过程中碰到的一些值得总结的问题

简介: 昨天大半夜装一个RH5+Oracle版本,期间碰到了几件事情,陈述如下,以此为据。1. 安装前需要配置内核参数,可参考Oracle官方文档推荐的最低值来设置,但往往机器自身有些参数值已有了,例如kernel.

昨天大半夜装一个RH5+Oracle版本,期间碰到了几件事情,陈述如下,以此为据。


1. 安装前需要配置内核参数,可参考Oracle官方文档推荐的最低值来设置,但往往机器自身有些参数值已有了,例如kernel.shmmax、kernel.shmall,也参考过网上不少帖子,设置的值有所差别,此时官方文档中的一句话值得我们注意:

“Note: If the current value of any parameter is higher than the value listed in this table, then do not change the value of that parameter.”

也就是说如果已有的参数值大于文档中推荐的最低值,那么可以不做改动。


2. 包括官方文档,还有网上一些实战贴,都提到了可以修改Shell Limits限制以提高效率。那这是为什么呢?

一般我们需要新增设置的是oracle安装账户对应的nproc和nofile取值,通常还有hard和soft之分,那他们究竟代表什么呢?

其实从/etc/security/limits.conf文件的注释信息就可以得出一些答案:

(1) 格式<domain> <type> <item> <value>,

其中<domain>可以是用户名、组名,通配符*表示默认所有,通配符%表示模糊匹配的选项。

<type>有soft和hard之分,soft表示当前系统生效的设置值,hard表示系统最大可接受的设置值。

<item>则有很多项,例如core、stack、nofile、nproc等,nofile表示最大可打开的文件数量,nproc表示最大进程数量。


3. 配置账户环境变量时,有些帖子写的非常多,即使是PATH、LD_LIBRARY_PATH,可能不同人安装时都加载的不同,确实比较有迷惑性。但实际上,就我个人看来,比较重要的有:ORACLE_HOME、ORACLE_SID、ORACLE_BASE,如果用到一些sqlplus这些命令行工具,那么PATH中添加对应的工具bin路径也是必不可少的,LD_LIBRARY_PATH、CLASSPATH等变量中会有一些库的路径,另外,NLS_LANG则表示了当前的语言环境,其他选项可能未必是必选,我列出了我添加的部分profile内容:


4. 启动Oracle安装图形界面时,有些安装帖子往往说需要DISPLAY参数等,但至少应该用的是“xhost +”,xhost用来控制X Server访问权限的,通常用hostA登录到hostB执行应用程序时,对应用程序来说,hostA是client,但此时安装图形界面,是在hostB上显示,因此需要hostA上先运行xhost +,允许任何其他用户能访问hostA的X Server,或者使用xhost +ip,指定ip上的用户才可以访问。当然,以上操作都是建立在使用root账户切换到oracle安装账户的场景,例如:

root账户执行xhost +

su - oracle

oracle账户执行./runInstaller

如果直接使用oracle账户登录执行安装,则可能不用如上操作。


5. 我开始使用的是MOS上面提供的11.2.0.4安装包安装,但执行./runInstaller后,没有提示任何错误,包括日志,但就是没显示图形界面,等半天,于是换回了原来的11.2.0.1,搜了一下,有人和我的经历比较相像,他的原因是安装介质损坏,这可能需要再下载一次11.2.0.4的安装介质,比较一下大小才能确定了,但早期版本可以使用,至少说明平台不是问题,也许就出在安装介质中,这个暂时存疑。


6. 安装数据库时,会提示配置EM,但前提是需要有一个监听,我用netca配置了LISTENER默认监听后,无论start、status、stop,都提示:

以及Linux Error: 104: Connection reset by peer

查了很多地方都没有找到原因,后来根据网上的一篇帖子,介绍了一篇MOS的文章(343295.1),指出类似“Linux Error: 104: Connection reset by peer”的错误,往往发生在新安装的过程中,并且提出了三种可能的原因:

1. There is possibly an incorrect IP Address specified for the host in the /etc/hosts file.

For example:

192.168.101.101 prod1.us.oracle.com prod1

Whereas the actual ip address for the host "prod1.us.oracle.com" is 192.168.101.110

2. Also, the localhost reference may be incorrect or missing from the /etc/hosts file.

3. Oracle may not have read access to /etc/nsswitch.conf file.

对应的方法有:

1. Correct the mapping in the /etc/hosts file by adding/correcting the IP address and/or hostname reference for the Unix/Linux Server (both long and short host names).

For example:

# Add or edit the /etc/hosts file to include a valid entry for the Server:

192.168.101.110     prod1.us.oracle.com     prod1

2. Check that the localhost loopback name and address are correct (both long and short host names).

An example of a correct localhost entry would be as follows:

127.0.0.1     localhost.localdomain    localhost

3. Remember to save the /etc/hosts file and then start the listener.

4. Check permissions on /etc/nsswitch.conf file to ensure group and other have read access.

   - If necessary change permisions on /etc/nsswitch.conf as follows:

          chmod 644 /etc/nsswitch.conf

在我的安装中,原先listener.ora使用的是HOST=hostname,后来改为实际IP,也是报错,根据上面提到的第一、二点,查看/etc/hosts,存在ip和hostname的对应,但没有127.0.0.1 localhost的这行,被注释了。

#127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

172.27.19.56    dcsopenNode1.localdomain dcsopenNode1

于是,打开注释,重启监听,一切正常。

至于第三点,没做过研究。


总结

以上主要说明了本次安装过程中碰到的一些问题点,包括内核参数设置值、limits.conf文件、环境变量、监听启动失败等。

目录
相关文章
|
4月前
|
SQL Oracle 关系型数据库
Win10下安装Oracle 18c
Win10下安装Oracle 18c
|
5月前
|
SQL Oracle 关系型数据库
本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
142 0
|
7月前
|
Oracle 关系型数据库 Java
云服务器安装oracle修改IP地址监听器报错问题
当在云服务器中安装oracle时,按照一般的安装步骤安装后,需要修改两个文件的iIP地址才可以在本机进行访问,修改注意点: 监听器部分不要改成服务器的公网IP,要改成服务器的计算机名字才可以,两个配置文件夹均要修改
70 0
|
7月前
|
Oracle 关系型数据库 数据库
contOS7下安装Oracle11g数据库(二)
contOS7下安装Oracle11g数据库(二)
121 0
|
1月前
|
Oracle 关系型数据库 数据库
如何利用 Docker 安装 Oracle 数据库
【2月更文挑战第14天】
94 0
|
4月前
|
Oracle 关系型数据库 数据库
docker下安装oracle11g(一次安装成功)
docker下安装oracle11g(一次安装成功)
92 0
|
5月前
|
Oracle 关系型数据库
Oracle安装错误——[ INS-32010 ] 主目录位置包含无效字符
Oracle安装错误——[ INS-32010 ] 主目录位置包含无效字符
140 0
|
5月前
|
Oracle 关系型数据库 数据安全/隐私保护
docker 下安装oracle
docker 下安装oracle
103 0
|
1月前
|
存储 Oracle 关系型数据库
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
|
6月前
|
Oracle 关系型数据库 数据库
Win11系统如何安装Oracle数据库(超级详细)
Win11系统如何安装Oracle数据库(超级详细)
217 0