温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

CentOS下怎么安装Oracle11g数据库管理系统

发布时间:2022-01-20 16:32:34 来源:亿速云 阅读:123 作者:iii 栏目:开发技术

这篇“CentOS下怎么安装Oracle11g数据库管理系统”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“CentOS下怎么安装Oracle11g数据库管理系统”文章吧。

oracle11g是甲骨文公司凭借自已30年的设计经验,成功打造的功能强大的关系数据库管理系统,目前共发行了linux版本和windows版本,软件数据库的高效性、安全性、稳定性、延展性,是其成功的关键因素,世界上的几乎所有大型信息化系统都在应用Oracle技术。

环境准备

\1. 一台装有CentOS 6.8 x64的服务器(虚拟机也可)

\2. linux.x64_11gR2_database_1of2.zip

\3. linux.x64_11gR2_database_2of2.zip”

系统要求如下

\1. SWAP分区大于3G

\1. Oracle安装目录剩余空间大于20G

\2. Centos6.x 系统

安装centos系统

首先我们要安装一个带X window的版本。

配置系统参数

\1. 添加oracle用户 使用一下命令,创建组和用户

root@localhost:~# groupadd oinstallroot@localhost:~# groupadd dbaroot@localhost:~# groupadd operroot@localhost:~# useradd -g oinstall -G dba,oper oracleroot@localhost:~# passwd oracle

\2. 配置内核参数 将一下内容写入/etc/sysctl.conf

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

\3. 配置系统句柄限制 在 /etc/security/limits.conf 文件中添加下列参数 用于优化内核可以不修改,不修改可能会出现溢出

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

安装oracle

使用oracle用户,运行此命令开始安装oracle

oracle@localhost:~$ /u01/app/database/runInstaller

\1. Configure Security Updates 我们去掉oracle support password 的,email可以不用填写.下一步 提示没有email 直接点yes忽视即可

  CentOS下怎么安装Oracle11g数据库管理系统

\2. Select Installation Option 安装和配置数据库` 只安装实例 升级数据库 我们选择安装和配置数据库 CentOS下怎么安装Oracle11g数据库管理系统 

\3. System Class 桌面版本 服务器版本 我这里选择服务器版本 CentOS下怎么安装Oracle11g数据库管理系统

\4. Node selection 单实例 集群环境 我这里选择单实例模式 CentOS下怎么安装Oracle11g数据库管理系统

\5. Select Install Type 普通安装 高级安装 我这里选择高级安装 CentOS下怎么安装Oracle11g数据库管理系统

\6. Select Product Language 选择你所需要的语言 我这里只用到英语。所已只有English就可以 要用到中文存储的往后看 CentOS下怎么安装Oracle11g数据库管理系统

\7. Select Database Edition 企业版 标准版 标准版1 我这里选择的是企业版 CentOS下怎么安装Oracle11g数据库管理系统 

PS:需要了解其中不懂的可以参考 [Oracle EE SE SE1各版本区别]

\8. Specify Installation Location 设置oracle 安装目录和home 目录 这个位置是获取oracle 的 $ORACLE_BASE$ ORACLE_HOME 的值 (尽量不要修改。如果修改请一起修改oracle用户的变量值) CentOS下怎么安装Oracle11g数据库管理系统

\9. Create Inventory 设置oracle 记录文件位置 保持默认即可 CentOS下怎么安装Oracle11g数据库管理系统

\10. Select Configuration Type CentOS下怎么安装Oracle11g数据库管理系统

\11. Specify Database Identifiers 设置实例名 CentOS下怎么安装Oracle11g数据库管理系统

\12. Specify Configuration Options 配置实例参数,可以根据实际情况配置内存占用。尽量不要超过50% CentOS下怎么安装Oracle11g数据库管理系统 

如果数据库中需要存储中文在Character sets中设置GBK字符集

\13. Specify Management Options 设置数据库管理选项 直接下一步,暂时不需要。 CentOS下怎么安装Oracle11g数据库管理系统

\14. Specify Database Storage Options 知道数据库存储选项 这里选择文件系统,不使用asm管理文件

\15. Specify Recovery Options 数据库恢复选项 这里不开启自动备份数据库 如果有需要可以自行调整 CentOS下怎么安装Oracle11g数据库管理系统

\16. Specify Schema Passwords 设置数据库密码 按照需要设置数据库密码 CentOS下怎么安装Oracle11g数据库管理系统

\17. Privileged Operating System Groups 设置数据库权限组,用于和本机用户绑定。 CentOS下怎么安装Oracle11g数据库管理系统

\18. Perform Prerequisite Checks 效验数据库安装环境 CentOS下怎么安装Oracle11g数据库管理系统 

PS:出现以下这些包未安装。

  CentOS下怎么安装Oracle11g数据库管理系统 

需要安装包

gcc.x86_64
libaio.i686
glibc.i686
compat-libstdc++-33.i686
compat-libstdc++-33.x86_64
elfutils-libelf-devel
gcc-c++
libaio-devel.x86_64
libaio-devel.i686
libstdc++.i686
unixODBC.i686
unixODBC.x86_64
unixODBC-devel.x86_64
unixODBC-devel.i686

先安装 epel源

root@localhost:~# yum install epel-release -y

然后下载pdksh-5.2.14

root@localhost:~# wget ftp://rpmfind.net/linux/centos/5.11/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm

最后在安装其他包

安装完成后点击 Check Again 重新效验 CentOS下怎么安装Oracle11g数据库管理系统 

剩下的这些包是因为Oracle 11G 需要的是i386版本而centos6开始使用i686标准导致的,勾选右上角的Ignore All。 PS: [i386和i686区别]

\19. Summary 数据安装的配置文本。有需要的可以保持配置文本 CentOS下怎么安装Oracle11g数据库管理系统

\20. Install Product 开始安装,等待。。。。。 CentOS下怎么安装Oracle11g数据库管理系统 

安装块结束时会弹出一个对话框。

CentOS下怎么安装Oracle11g数据库管理系统 

这里我们点击右下角的Password Management 修改密码,有需要的可以开启socct用户 CentOS下怎么安装Oracle11g数据库管理系统 

这个弹框提示我们需要用root权限运行这两脚本。 CentOS下怎么安装Oracle11g数据库管理系统 

切换到root用户运行下面命令

root@localhost:~# /u01/app/oraInventory/orainstRoot.shroot@localhost:~# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

点击ok完成安装

\21. Finish 完成安装 图中有em控制台的地址 CentOS下怎么安装Oracle11g数据库管理系统

为oracle创建服务

\1. 设置dbstart命令生效 修改 /etc/oratab文件最后一行的最后一个N改为Y

orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y

\2. 新建/etc/init.d/oracle 文件 将下列内容写入到文件中

#chkconfig:2345 98 05#description:Oracle Server#add for oracleORACLE_BASE=/u01/app/oracle/export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_HOME
ORACLE_SID=orclexport ORACLE_SID
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/libexport LD_LIBRARY_PATHcase "$1" instart)echo "Starting Oracle..."su - oracle -c "lsnrctl start"su - oracle -c "dbstart 1> $ORACLE_HOME/bin/dbstart.log 2> $ORACLE_HOME/bin/dbstart.err"echo "Started."exit 0
;;
stop)echo "Stoping Oracle..."su - oracle -c "lsnrctl stop"su - oracle -c "dbshut"echo "Stoped."exit 0
;;
*)echo "Usage: $0 {start|stop}"exit 1esac

\3. 然后给oracle文件执行权限

root@localhost:~# chmod +x /etc/init.d/oracle

\4. 添加开机启动

root@localhost:~# chkconfig --add oracleroot@localhost:~# chkconfig oracle on

\5. 添加开机启动em控制台

/etc/rc.loder文件中添加

su - oracle -c "emctl start dbconsole"

完成安装

博主整理了一下oracle的常用命令

dbca 数据库配置器
netca 监听器配置器
netmgr 监听控制器
dbstart 开启数据库
dbshut 关闭数据库
lsnrctl start 开启监听
lsnrctl stop 关闭监听
emctl start dbconsole 开启em控制台
emctl stop dbconsole 关闭em控制台
sqlplus / as sysdba 使用sysdba权限登录当前数据库

以上就是关于“CentOS下怎么安装Oracle11g数据库管理系统”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注亿速云行业资讯频道。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI