===========================================
-Environment: VM12 + centos7 x86_64 minimal
-Minimize the installation of Centos7
-Virtual machine configuration
-50G hard drive
-2G ram + 2G swap
===========================================
[Root] [oracle] Represents the specific user to execute
I. Adjust the system
[root]
#Install some necessary software
## wget for download
## unzip Extract the oracle installation file
## net-tools View the local network conditions, such as netstat
yum install wget unzip net-tools -y
#Use the environment configuration tool provided by oracle
## This tool will adjust the kernel parameters and create some necessary linux users & groups
## Perhaps the network is not good, the installation will be unsuccessful, install more
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
yum install oracle-rdbms-server-11gR2-preinstall -y
#Back up the files in this directory to other directories after completion
## This folder is the modified log and the original kernel configuration backup
/ var / log / oracle-rdbms-server-11gR2-preinstall
#Load kernel parameters same as sysctl -p
sysctl -f
#Create some directories and configuration
## Configure oracle system configuration file & authorization
cat >> /etc/oraInst.loc << EOF
inventory_loc = / home / oracle / ora11g / oraInventory
inst_group = oinstall
EOF
chmod 664 /etc/oraInst.loc
## Create oracle installation directory & authorization
mkdir -p / u01 / app /
mkdir / u01 / tmp
chown -R oracle: oinstall / u01 / app /
chmod -R 775 / u01 / app /
chmod a + wr / u01 / tmp
#Set oracle user password oracle was created by the installation tool itself, refer to what I said before
passwd oracle
2. Configure user environment & upload files
[oracle]
#Add some necessary environment for oracle users
cat >> /home/oracle/.bash_profile << EOF
TMP = / u01 / tmp
TMPDIR = / u01 / tmp
export TMP TMPDIR
ORACLE_BASE = / u01 / app / oracle
ORACLE_HOME = / u01 / app / oracle / product / 11.2.0 / dbhome_1
ORACLE_SID = orcl
PATH = $ ORACLE_HOME / bin: $ PATH
export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH
EOF
#Effective
source .bash_profile
#Upload to / home / oracle /
################### 50%
linux.x64_11gR2_database_2of2.zip
linux.x64_11gR2_database_1of2.zip
##################################### 100%
#Unzip The files will be in / home / oracle / database /
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
## For some reason file permission issues run this command (optional)
chown -R oracle: oinstall / home / oracle / database
Three. Configure db_install.rsp
[oracle]
#Backup to / home / oracle / rsp /
cp -r / home / oracle / database / response / home / oracle / rsp
#Configure the installation response file db_install.rsp file Here the configuration parameters are downloaded to the local first. Use Notepad to modify them according to your own situation. Upload in the past.
## My /home/oracle/rsp/db_install.rsp
oracle.install.responseFileVersion = / oracle / install / rspfmt_dbinstall_response_schema_v11_2_0
#INSTALL_DB_AND_CONFIGInstall and automatically configure the database instance and listener
# Otherwise configure the other two files, create a new instance and listen
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 / dbhome_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
#This is the service name
oracle.install.db.config.starterdb.globalDBName = orcl.lan
#Instancesid
oracle.install.db.config.starterdb.SID = orcl
oracle.install.db.config.starterdb.characterSet = AL32UTF8
oracle.install.db.config.starterdb.memoryOption = true
#Minimum 256M I choose the smallest one for learning
oracle.install.db.config.starterdb.memoryLimit = 256
#Whether to install the learned scott and hr (I know both)
oracle.install.db.config.starterdb.installExampleSchemas = true
oracle.install.db.config.starterdb.enableSecuritySettings = true
#Password all set to oracle (will prompt during installation, personal learning 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
#Modify and finish saving | Upload to / home / oracle / rsp
Four. Silent installation of the database
[oracle]
#installation
## There will be a warning of irregular passwords, ignore
/ home / oracle / database / runInstaller -silent -ignorePrereq -responseFile /home/oracle/rsp/db_install.rsp
## View the installation process Open another shell and wait
tail -f /home/oracle/ora11g/oraInventory/logs/installActions2017-09-24_12-26-49PM.log
# Finally, it will prompt the installation is complete! [Switch root execution]
[Switch to Oracle]
#sqlplusLogin
sqlplus / as sysdba
#View status
select status from v $ instance;
V. Configure the firewall
[root]
#View port 1521
netstat -an | grep 1521
#Firewall release port 1521
firewall-cmd --zone = public --add-port = 1521 / tcp --permanent
#Reload firewall rules
firewall-cmd --reload
Six. Database startup & shutdown
[root]
#Modify the oracle service startup configuration
vi / etc / oratab
: wq save
[oracle]
#Start oracle
#Because / etc / oratab N-> y is modified, the service will also start the instance at the same time
## N's situation will not start the instance at the same time sqlplus login will prompt an idle instance
## Start the instance with sqlplus and then ---> startup
#Start this system after restarting the system
dbstart $ ORACLE_HOME
#shut down
dbshut $ ORACLE_HOME
# Remote connection oracle
sqlplus sys / [email protected]: 1521 / ORCL.LAN as sysdba
conn sys / [email protected]: 1521 / ORCL.LAN as sysdba
ORCL.LAN is the service name, not the sid
Seven. Other Delete the installation files, etc., and then the space of the virtual hard disk is not released. Refer to the following tutorial
Clean up the virtual disk after deleting the installation files
Vmware: how to compress linux virtual machine disk space
After two days of tossing back and forth, I also encountered many pits. If you can find it online, don't say it.
Note the reference documentation
reference:
oracle official documentation
Getting Started with the Oracle Linux Yum Server | Oracle, Software. Hardware. Complete. Http://public-yum.oracle.com/getting-started.html
oracle-dba tips corner http://www.idevelopment.info/data/Oracle/DBA_tips/Unix/UNIX_4.shtml
Oracle silent installation file db_install.rsp detailed explanation-bobower-ChinaUnix blog http://blog.chinaunix.net/uid-23886490-id-3565908.html
The detailed process of installing oracle 11g is for reference only-xiaobai-Blog Park http://www.cnblogs.com/startnow/p/6111514.html
"connected to an idle instance" caused by the oracle environment variable-Question and Answer on Alibaba Welcome to Alibaba.com, Join Free |
Oracle 11g silent installation and error handling during centos7 installation-winewei's blog-CSDN blog http://blog.csdn.net/winewei/article/details/57409206
Oracle11gR2 for Linux silent installation-[email protected]-Blog Park
How to simplify the installation of Oracle Database on Oracle Linux http://www.oracle.com/technetwork/cn/articles/servers-storage-admin/ginnydbinstallonlinux-1404242-zhs.html
Hold on.
Centos7 install Oracle 11gR2