centos7安装Oracle
更新时间:2024-04-16 05:51:02 阅读量: 综合文库 文档下载
一些简单的过程就不列在这里了,网上也有很多,这里主要写下遇到的一些问题,以及解决方案
CentOS 7 的环境为
[plain]view plaincopy print?
1. $ uname -a
2. Linux oracle 3.10.0-123.13.1.el7.x86_64 #1 SMP Tue Dec 9 23:06:09 UTC 201
4 x86_64 x86_64 x86_64 GNU/Linux
注意安装的时候需要安装一个桌面系统(X-Windows + KDE 或者 Gnome),否则安装程序无法运行。
然后根据需要修改共享内存等等系统参数。这个也不写了,网上有很多。不过据我的测试,CentOS7貌似不需要修改也是可以的,Oracle在进行安装检查的时候没有报告问题(和以前的不一样)。当然为了调优数据库的性能,还是修改的好。
安装gcc,因为后面Oracle link的时候会用到 yum install gcc 安装结果为
[plain]view plaincopy print?
1. gcc --version
2. gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16) 3. Copyright (C) 2013 Free Software Foundation, Inc.
4. This is free software; see the source for copying conditions. There is N
O
5. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS
E.
(这里注意,因为Oracle需要的3.4和安装的4.8的参数的区别,后面link会失败,解决方法见后)
1. 下载,需要下载两个文件
p10404530_112030_Linux-x86-64_1of7.zip
p10404530_112030_Linux-x86-64_2of7.zip 2. 解压缩,把这两个文件解压到同一个目录下
3. 运行installer。中间依赖检查那一步,可以Skip。因为Oracle要检查是否安装了gcc,glibc等等比较老的版本(3.4)
4. 前面一切顺利。到了Link那一步,出错了。Log显示 error in invoking target 'agent nmhs' 在网上查到了解决方案:
[plain]view plaincopy print?
1. vi $ORACLE_HOME/sysman/lib/ins_emagent.mk 2. Search for the line 3. $(MK_EMAGENT_NMECTL) 4. Change it to:
5. $(MK_EMAGENT_NMECTL) -lnnz11
5. Retry重试。这就OK了。
6. 之后就没啥问题了。正常安装,执行root脚本,等等。 7. 安装后重启服务器。
8. 重启后,检查oracle用户的环境变量:
[plain]view plaincopy print?
1. declare -x ORACLE_HOME=\
2. declare -x ORACLE_SID=\
9. 进入$ORACLE_HOME/network/admin,检查listener.ora:
[plain]view plaincopy print?
1. [oracle@oracle admin]$ cat listener.ora
2. # listener.ora Network Configuration File: /home/oracle/app/oracle/produc
t/11.2.0/dbhome_1/network/admin/listener.ora 3. # Generated by Oracle configuration tools. 4.
5. SID_LIST_LISTENER = 6. (SID_LIST = 7. (SID_DESC =
8. (SID_NAME = orcl)
9. (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1) 10. ) 11. ) 12.
13. LISTENER =
14. (DESCRIPTION_LIST = 15. (DESCRIPTION =
16. (ADDRESS = (PROTOCOL = TCP)(HOST = 10.16.33.212)(PORT = 1521)) 17. ) 18. ) 19.
20. ADR_BASE_LISTENER = /home/oracle/app/oracle
重点检查其中的SID,HOST,PORT,ORACLE_HOME是否正确。如果不正确客户端会报告ERROR-ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务错误。 如果没有问题,进入$ORACLE_HOME/bin,启动监听器:
[plain]view plaincopy print?
1. [oracle@oracle bin]$ ./lsnrctl 2.
3. LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 16-DEC-2014 11:22:0
3 4.
5. Copyright (c) 1991, 2011, Oracle. All rights reserved. 6.
7. Welcome to LSNRCTL, type \
[plain]view plaincopy print?
1. LSNRCTL> start
2. Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: ple
ase wait... 3. 4.
5. TNSLSNR for Linux: Version 11.2.0.3.0 - Production
6. System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/
network/admin/listener.ora
7. Log messages written to /home/oracle/app/oracle/diag/tnslsnr/oracle/liste
ner/alert/log.xml
8. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.16.33.212)(POR
T=1521))) 9. 10.
11. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.16.33.212)(POR
T=1521)))
12. STATUS of the LISTENER 13. ------------------------
14. Alias LISTENER
15. Version TNSLSNR for Linux: Version 11.2.0.3.0 - Product
ion
16. Start Date 16-DEC-2014 11:22:07 17. Uptime 0 days 0 hr. 0 min. 0 sec 18. Trace Level off
19. Security ON: Local OS Authentication 20. SNMP OFF
21. Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1
/network/admin/listener.ora
22. Listener Log File /home/oracle/app/oracle/diag/tnslsnr/oracle/lis
tener/alert/log.xml
23. Listening Endpoints Summary...
24. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.16.33.212)(PORT=1521))) 25. Services Summary...
26. Service \
27. Instance \28. The command completed successfully
29. LSNRCTL>
启动正常,使用sqlplus启动数据库:
[plain]view plaincopy print?
1. [oracle@oracle bin]$ ./sqlplus '/ as sysdba' 2. SQL> startup
3. ORACLE instance started. 4. 5.
6. Total System Global Area 960372736 bytes 7. Fixed Size 2234160 bytes 8. Variable Size 557844688 bytes 9. Database Buffers 394264576 bytes 10. Redo Buffers 6029312 bytes 11. Database mounted. 12. Database opened.
10. Centos7自带了SELINUX,关掉
11. Centos7自带了下一代防火墙firewalld,关掉,否则客户端连接过来会报TNS Timeout异常
[plain]view plaincopy print?
1. [root@oracle ~]# service firewalld stop
2. Redirecting to /bin/systemctl stop firewalld.service
=============================================== 现在其它机器就应该可以正常连接并使用Oracle了。
另:装Oracle最省事的还是在Oracle自己的Enterprise Linux上安装。那些依赖,系统参数,等等等都不需要设置了。
正在阅读:
centos7安装Oracle04-16
医院病案室工作总结10-27
醒悟经典读后感10篇12-12
冀教版六年级下unit 2《Lesson 13 Exercise》word教案2篇05-31
绿化及林业工程竣工资料表格12-19
2017年申请国外博士个人简历(CV)模板 - 图文04-17
钢筋混凝土结构裂缝产生的原因及其措施分析07-26
SEW减速机油封更换方法08-09
高三物理复习资料大全03-08
- 小学生造句大全
- 增压泵投资项目可行性研究报告(模板)
- 高中语文人教版粤教版必修1-5全部文言文知识点归纳
- 两学一做专题民主生活会组织生活会批评与自我批评环节个人发言提
- 管理处环境保洁工作操作标准作业指导书
- 2012六一儿童节活动议程 - 图文
- 移树申请报告
- 《贵州省市政工程计价定额》2016定额说明及计算规则
- 计算机长期没有向WSUS报告状态
- 汉语拼音教学策略研究
- 发展西部领先的航空货运枢纽
- 司法所上半年工作总结4篇
- 如何提高银行服务水平
- 发电厂各级人员岗位职责
- 丰田汽车的外部环境分析
- 2017—2018年最新冀教版四年级数学下册《混合运算》教案精品优质
- 中建八局样板策划 - 图文
- 戚安邦《项目管理学》电子书
- 2015年高级项目经理笔记
- 弯桥的设计要点
- centos7
- 安装
- Oracle