最新要闻

广告

手机

iphone11大小尺寸是多少?苹果iPhone11和iPhone13的区别是什么?

iphone11大小尺寸是多少?苹果iPhone11和iPhone13的区别是什么?

警方通报辅警执法直播中被撞飞:犯罪嫌疑人已投案

警方通报辅警执法直播中被撞飞:犯罪嫌疑人已投案

家电

centos7安装oracle11g11.2.0.4.0

来源:博客园

1,下载oracle11g11.2.0.4.0安装包,解压

2,配置安装环境

1,下载配置环境文件-------------------------------------------------------------------------------------------------------------------------------------cd /etc/yum.repos.d  wget http://public-yum.oracle.com/public-yum-ol7.repo   wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracleyum install oracle-rdbms-server-11gR2-preinstall -y  ##安装Oracle环境配置程序,安装后环境自动配置
2,配置用户环境变量-------------------------------------------------------------------------------------------------------------------------------------cat >>  /home/oracle/.bash_profile   <<  EOF   #添加oracle用户的环境变量export ORACLE_BASE=/opt/oracleexport ORACLE_HOME=/opt/oracle/product/11.2.0/db_1export ORACLE_SID=orclexport PATH=$ORACLE_HOME/bin:/usr/sbin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libexport TNS_ADMIN=$ORACLE_HOME/network/adminEOF3,修改配置文件-------------------------------------------------------------------------------------------------------------------------------------修改解压后database目录下的 dbca.rsp db_install.rsp 这两个文件[root@yktmbsvcpt opt]# cd database/[root@yktmbsvcpt database]# lsinstall readme.html response rpm runInstaller sshsetup stage welcome.html[root@yktmbsvcpt database]# cd response/[root@yktmbsvcpt response]# lsdbca.rsp db_install.rsp netca.rsp
#################################################db_install.rsp 文件需要修改的地方oracle.install.option=INSTALL_DB_SWONLYORACLE_HOSTNAME=主机名UNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/opt/oracle/oraInventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/opt/oracle/product/11.2.0/db_1ORACLE_BASE=/opt/oracleoracle.install.db.InstallEdition=EEoracle.install.db.EEOptionsSelection=trueoracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=oinstalloracle.install.db.config.starterdb.SID=orcloracle.install.db.config.starterdb.characterSet=ZHS16GBKoracle.install.db.config.starterdb.password.ALL=everhighDECLINE_SECURITY_UPDATES=true
#################################################dbca.rsp 文件需要修改的地方GDBNAME = "orcl"SID = "orcl"CHARACTERSET = "ZHS16GBK"NATIONALCHARACTERSET= "UTF8"
#################################################

4,创建目录赋予权限-------------------------------------------------------------------------------------------------------------------------------------


(相关资料图)

mkdir /opt/oraclechown oracle:oinstall -R /opt/oraclechown oracle:oinstall -R database ##oracle解压后的目录

chmod 755 -R /opt/oracle

chmod 755 -R database

5,执行脚本,安装数据库程序-------------------------------------------------------------------------------------------------------------------------------------

su - oracle #切换用户

cd database

./runInstaller -silent -force -ignorePrereq -responseFile /opt/database/response/db_install.rsp

##执行后出现

Oracle Database 11g 的 安装 已成功。请查看 "/opt/oracle/oraInventory/logs/silentInstall2023-05-05_10-46-59AM.log" 以获取详细资料。以 root 用户的身份执行以下脚本: 1. /opt/oracle/oraInventory/orainstRoot.sh 2. /opt/oracle/product/11.2.0/db_1/root.shSuccessfully Setup Software.###以上文字,表示安装成功,然后切换root用户执行脚本

###以 root 用户的身份执行以下脚本:

su - root sh /opt/oracle/oraInventory/orainstRoot.shsh /opt/oracle/product/11.2.0/db_1/root.sh

6,执行脚本,安装监听程序-------------------------------------------------------------------------------------------------------------------------------------

su - oracle

netca /silent /responseFile /opt/database/response/netca.rsp

7,执行脚本,安装数据库-------------------------------------------------------------------------------------------------------------------------------------

dbca -silent -responseFile /opt/database/response/dbca.rsp ##执行后需要输入密码,输入配置文件密码即可

到此完成安装,开放防火墙,远程数据库即可。。。。

关键词: