RedHat+Oracle安装过程中碰到的一些值得总结的问题
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了RedHat+Oracle安装过程中碰到的一些值得总结的问题,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4722字,纯文字阅读大概需要7分钟。
内容图文
![RedHat+Oracle安装过程中碰到的一些值得总结的问题](/upload/InfoBanner/zyjiaocheng/561/ec81e31cb2b74d57aa882338f12cd760.jpg)
昨天大半夜装一个RedHat Linux 5+Oracle版本,期间碰到了几件事情,陈述如下,以此为据。安装前需要配置内核参数,可参考Oracle官
昨天大半夜装一个RedHat Linux 5+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) 格式
其中
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文件、环境变量、监听启动失败等。
本文永久更新链接地址:
内容总结
以上是互联网集市为您收集整理的RedHat+Oracle安装过程中碰到的一些值得总结的问题全部内容,希望文章能够帮你解决RedHat+Oracle安装过程中碰到的一些值得总结的问题所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。