[Oracle Deployment Implementation] CENTOS7 silent installation of Oracle 11GR2 single-instance database

Source: Internet
Author: User
Tags chmod gpg

CENTOS7 silent installation of Oracle 11GR2 single-instance database

1.vmware Minimized installation Centos7
Allocate 20G HDD +2g memory +nat Network 400mboot+4gswap remove kdump minimize installation and configure network
Cat/etc/sysconfig/network-scripts/ifcfg-ens32
bootproto= "Static"
Device= "Ens32"
onboot= "Yes"
ipaddr=192.168.188.11
netmask=255.255.255.0
gateway=192.168.188.2
dns1=192.168.188.2

2. Configure the Yum source
[Root]
Installing wget
Yum-y Install wget
Yum-y Install Unzip
Configuration 163yum
Cd/etc/yum.repos.d
MV Centos-base.repo Centos-base.repo.bak
wget Http://mirrors.163.com/.help/CentOS7-Base-163.repo-O Centos-base.repo
Configuring the OEL7 Source
wget Http://public-yum.oracle.com/public-yum-ol7.repo-O/etc/yum.repos.d/public-yum-ol7.repo
wget Http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7-O/etc/pki/rpm-gpg/rpm-gpg-key-oracle
The cache is re-brushed
Yum Clean All
Yum Makecache

3. Install the Oracle Environment Configuration tool
Yum-y Install Oracle-rdbms-server-11gr2-preinstall
#完成后备份一下这个目录的文件到其他目录 This folder is to modify the system after the log and the original kernel configuration backup
Mkdir/home/oracle/backup && Cp/var/log/oracle-rdbms-server-11gr2-preinstall "$_"-R
#加载内核参数 is the same as sysctl-p.
Sysctl-f
#设置oracle用户密码 Oracle was created by the installation tool itself, refer to what I said earlier
passwd Oracle

4. Create some directories and configurations
# #配置oracle系统配置文件 & Licensing
Cat >>/etc/orainst.loc <<eof
Inventory_loc=/home/oracle/ora11g/orainventory
Inst_group=oinstall
Eof
chmod 664/etc/orainst.loc
# #创建oracle安装的目录 & Licensing
Mkdir-p/u01/app/
Mkdir/u01/tmp
Chown-r oracle:oinstall/u01/app/
Chmod-r 775/u01/app/
chmod a+wr/u01/tmp

5. Configure user environment & upload files
[Oracle]
Cat >>/home/oracle/.bash_profile <<eof
Export Oracle_base=/u01/app/oracle
Export Oracle_home= $ORACLE _base/product/11.2.0/db_1
Export path= $ORACLE _home/bin: $PATH
Export ORACLE_SID=STD
Eof
WinSCP uploading installation files to Oralce home
Root User Installation Unzip
Yum-y Install Unzip
Extract
Unzip Linux.x64_11gR2_database_1of2.zip
Unzip Linux.x64_11gR2_database_2of2.zip

6. Configure the installation response file
[Oracle]
Modify a response file
Cat/home/oracle/database/response/db_install.rsp

# #我的/HOME/ORACLE/RSP/DB_INSTALL.RSP
Oracle.install.responsefileversion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
#INSTALL_DB_AND_CONFIG安装并自动配置数据库实例和监听 recommend first-time installation with this
#不然配置另外两个文件, creating new instances and listening
Oracle.install.option=install_db_and_config
Oracle_hostname=localhost
Unix_group_name=oinstall
Inventory_location=/home/oracle/ora11g/orainventory
Selected_languages=zh_cn,en
Oracle_home=/u01/app/oracle/product/11.2.0/db_1
Oracle_base=/u01/app/oracle
Oracle.install.db.installedition=ee
Oracle.install.db.iscustominstall=true
oracle.install.db.customcomponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0 , Oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms : 11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0, oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
Oracle.install.db.dba_group=dba
Oracle.install.db.oper_group=oinstall
Oracle.install.db.config.starterdb.type=general_purpose
#这个是服务名
Oracle.install.db.config.starterdb.globaldbname=std
#实例sid
Oracle.install.db.config.starterdb.sid=std
Oracle.install.db.config.starterdb.characterset=al32utf8
Oracle.install.db.config.starterdb.memoryoption=true
#最小256M I was studying, I chose the smallest.
oracle.install.db.config.starterdb.memorylimit=256
#是否安装学习的scott和hr (I knew these two)
Oracle.install.db.config.starterdb.installexampleschemas=true
Oracle.install.db.config.starterdb.enablesecuritysettings=true
#密码全设置成oracle (will be prompted during installation, personal learning is ignored)
Oracle.install.db.config.starterdb.password.all=oracle
Oracle.install.db.config.starterdb.control=db_control
Oracle.install.db.config.starterdb.dbcontrol.enableemailnotification=false
Oracle.install.db.config.starterdb.automatedbackup.enable=false
Oracle.install.db.config.starterdb.storagetype=file_system_storage
Oracle.install.db.config.starterdb.filesystemstorage.datalocation=/u01/app/oracle/oradata
#true
Decline_security_updates=true

7. Install the database silently
[Oracle]
#安装
# #会出现密码不规范的警告, ignore
/home/oracle/database/runinstaller-silent-ignoreprereq-responsefile/home/oracle/database/response/db_ Install.rsp
# #查看安装过程 Open another shell, wait a minute.
Tail-f/home/oracle/ora11g/orainventory/logs/installactions2018-07-23_07-37-45pm.log
#安装完成后执行
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh

8. Configure the Firewall
[Root]
#查看1521端口
Netstat-an|grep 1521
#防火墙 Release 1521 ports
Firewall-cmd--zone=public--add-port=1521/tcp--permanent
#重新加载防火墙规则
Firewall-cmd--reload

9. Startup & shutdown of the database
[Root]
#修改oracle服务启动配置 to start the instance together when the database starts
Vi/etc/oratab

[Oracle]
#启动oracle
#因为修改了/etc/oratab N->y So the startup service will also launch the instance at the same time
# #N的情况不会同时启动实例 Sqlplus Login will prompt an idle instance
# #用sqlplus then start the instance---> Startup
#重启系统后用这个命令启动
Dbstart $ORACLE _home
#关闭
Dbshut $ORACLE _home


Appendix:
1.CENTOS7 Installing Oracle 11gR2-a small white-blog Park https://www.cnblogs.com/startnow/p/7580865.html

[Oracle Deployment Implementation] CENTOS7 silent installation of Oracle 11GR2 single-instance database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.