oracle19c silently installs centos7.5
1. Basic environment configuration
Turn off the firewall: systemctl disable firewalld Turn off selinux:/etc/selinux/config Change hostname: /ect/hosts 192.168.80.148 (write your own IP) oracle19c
1.2.yum installs the dependency packages required by oracle
yum install -y bc
yum install -y compat-libcap1*
yum install -y compat-libcap*
yum install -y binutils
yum install -y compat-libstdc + ±33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc-2.5
yum install -y glibc-common
yum install -y glibc-devel
yum install -y glibc-headers
yum install -y ksh libaio
yum install -y libaio-devel
yum install -y libgcc
yum install -y libstdc++
yum install -y libstdc + ±devel
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
yum install -y binutils*
yum install -y compat-libstdc*
yum install -y elfutils-libelf*
yum install -y gcc*
yum install -y glibc*
yum install -y ksh*
yum install -y libaio*
yum install -y libgcc*
yum install -y libstdc*
yum install -y make*
yum install -y sysstat*
yum install -y libXp*
yum install -y glibc-kernheaders
yum install -y net-tools-*
1.3. Modify the Linux kernel file
cat << EOF >> /etc/sysctl.conf kernel.shmmax = 277495689510912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 fs.file-max = 6815744 kernel.shmall = 67747971072 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1 #net.core.somaxconn = 262144 net.core.netdev_max_backlog = 262144 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_max_syn_backlog = 262144 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 1 net.ipv4.tcp_fin_timeout = 1 net.ipv4.tcp_keepalive_time = 30 net.ipv4.tcp_keepalive_probes = 6 net.ipv4.tcp_keepalive_intvl = 5 net.ipv4.tcp_timestamps = 0 fs.aio-max-nr = 1048576 net.ipv4.conf.all.rp_filter = 2 net.ipv4.conf.default.rp_filter = 2 EOF
sysctl -p takes effect
1.4. Modify limits.conf
cat << 'EOF' >> /etc/security/limits.conf oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 16384 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768 oracle hard memlock 134217728 oracle soft memlock 134217728 EOF
1.5. Add the following entries to /etc/pam.d/login
cat << 'EOF' >> /etc/pam.d/login session required /lib/security/pam_limits.so session required pam_limits.so EOF
1.6. Add the following statements in /etc/profil
cat << 'EOF' >> /etc/profile if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi EOF #Make environment variables effective source /etc/profile
2. Create files and corresponding directories
groupadd dba groupaddoper groupadd oinstall useradd -g oinstall -G dba,oper oracle mkdir -p /u01/app/oracle mkdir -p /u01/app/oracle/oradata mkdir -p /u01/oraInventory chown -R oracle.oinstall /u01 chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01/app/oracle mkdir -p /u01/app/oracle/product/19c/db_1 #ORACLE’s HOME directory chown -R oracle:oinstall /u01/app/oracle/product/ passwd oracle #Add password
2.1 Configure oracle user environment variables
su-oracle cat << 'EOF' >> .bash_profile export EDITOR=vi #The default editor is vi export TMP=/tmp #ORACLE’s default temporary directory is /tmp export TMPDIR=$TMP #Temporary directory generation export ORACLE_SID=orcl #ORACLE instance name is orcl export ORACLE_BASE=/u01/app/oracle #ORACLE’s base directory export ORACLE_HOME=$ORACLE_BASE/product/19c/db_1 #HOME directory of the ORACLE database export INVENTORY_LOCATION=/u01/oraInventory #ORACLE inventory during installation export TNS_ADMIN=$ORACLE_HOME/network/admin #ORACLE's network home directory export LD_LIBRARY_PATH=$ORACLE_HOME/lib # ORACLE library file directory export NLS_LANG="AMERICAN_AMERICA.AL32UTF8" #ORACLE's character set, but we deprecated it because we use UTF8 export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS" #ORACLE's date format. We modify it using the session method. Deprecated export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin umask 022 EOF source .bash_profile #Make environment variables effective
2.2. Upload the database installation package to $ORACLE_HOME
cd /u01/app/oracle/product/19c/db_1/ chown -R oracle:oinstall /u01/app/oracle/product/19c/db_1/LINUX.X64_193000_db_home.zip Unzip: su-oracle cd /u01/app/oracle/product/19c/db_1/ unzip LINUX.X64_193000_db_home.zip
2.3 Silent installation configuration executes this db_install.rsp script file
su-oracle cd /u01/app/oracle/product/19c/db_1/install/response
vim db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOME=/u01/app/oracle/product/19c/db_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=oper oracle.install.db.OSBACKUPDBA_GROUP=dba oracle.install.db.OSDGDBA_GROUP=dba oracle.install.db.OSKMDBA_GROUP=dba oracle.install.db.OSRACDBA_GROUP=dba oracle.install.db.rootconfig.executeRootScript=false oracle.install.db.rootconfig.configMethod=ROOT
After the modification is completed, execute:
cd /u01/app/oracle/product/19c/db_1
./runInstaller -silent -force -noconfig -ignorePrereq -responseFile /u01/app/oracle/product/19c/db_1/install/response/db_install.rsp
Note: Two orainstRoot.sh and root.sh appear. Open a terminal to execute these two scripts. They must be under the root user. Just copy them directly.
2.4 Configure monitoring netca.rsp
Execute directly:
cd /u01/app/oracle/product/19c/db_1/bin
./netca -silent -responsefile /u01/app/oracle/product/19c/db_1/assistants/netca/netca.rsp
lsnrctl start
2.5 Configuration dbca.rsp
############################################## ############################### ## ## ## DBCA response file ## ## ------------------ ## ## Copyright(c) Oracle Corporation 1998,2019. All rights reserved. ## ## ## ## Specify values for the variables listed below to customize ## ## your installation. ## ## ## ## Each variable is associated with a comment. The comment ## ## can help to populate the variables with the appropriate ## ## values. ## ## ## ## IMPORTANT NOTE: This file contains plain text passwords and ## ## should be secured to have read permission only by oracle user ## ## or db administrator who owns this installation. ## ################################################ ############################ #------------------------------------------------ ---------------------------------- # Do not change the following system generated value. #------------------------------------------------ ---------------------------------- responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0 #------------------------------------------------ ---------------------------- # Name : gdbName #Datatype: String # Description: Global database name of the database # Valid values : <db_name>.<db_domain> - when database domain isn't NULL # <db_name> - when database domain is NULL # Default value : None # Mandatory : Yes #------------------------------------------------ ---------------------------- gdbName=orcl #------------------------------------------------ ---------------------------- # Name: sid #Datatype: String # Description: System identifier (SID) of the database # Valid values : Check Oracle19c Administrator's Guide # Default value : <db_name> specified in GDBNAME # Mandatory : No #------------------------------------------------ ---------------------------- sid=orcl #------------------------------------------------ ---------------------------- # Name : databaseConfigType #Datatype: String # Description: database conf type as Single Instance, Real Application Cluster or Real Application Cluster One Nodes database # Valid values : SI\RAC\RACONENODE # Default value : SI # Mandatory : No #------------------------------------------------ ---------------------------- databaseConfigType=SI templateName=General_Purpose.dbc #------------------------------------------------ ---------------------------- # Name: createAsContainerDatabase #Datatype: boolean # Description: flag to create database as container database # Valid values : Check Oracle19c Administrator's Guide # Default value : false # Mandatory : No #------------------------------------------------ ---------------------------- createAsContainerDatabase=false #------------------------------------------------ ---------------------------- # Name: sysPassword #Datatype: String # Description: Password for SYS user # Valid values : Check Oracle19c Administrator's Guide # Default value : None # Mandatory : Yes #------------------------------------------------ ---------------------------- sysPassword=oracle #------------------------------------------------ ---------------------------- # Name : systemPassword #Datatype: String # Description: Password for SYSTEM user # Valid values : Check Oracle19c Administrator's Guide # Default value : None # Mandatory : Yes #------------------------------------------------ ---------------------------- systemPassword=oracle #------------------------------------------------ ---------------------------- # Name : datafileDestination #Datatype: String # Description: Location of the data file's # Valid values : Directory for all the database files # Default value : $ORACLE_BASE/oradata # Mandatory : No #------------------------------------------------ ---------------------------- datafileDestination=/u01/app/oracle/oradata #------------------------------------------------ ---------------------------- # Name : storageType #Datatype: String # Description: Specifies the storage on which the database is to be created # Valid values : FS (CFS for RAC), ASM # Default value: FS # Mandatory : No #------------------------------------------------ ---------------------------- storageType=FS #------------------------------------------------ ---------------------------- # Name: sampleSchema #Datatype: Boolean # Description: Specifies whether or not to add the Sample Schemas to your database # Valid values : TRUE \ FALSE # Default value : FASLE # Mandatory : No #------------------------------------------------ ---------------------------- sampleSchema=TRUE #------------------------------------------------ ---------------------------- # Name : databaseType #Datatype: String # Description: used for memory distribution when memoryPercentage specified # Valid values : MULTIPURPOSE|DATA_WAREHOUSING|OLTP # Default value: MULTIPURPOSE # Mandatory :NO #------------------------------------------------ ---------------------------- databaseType=MULTIPURPOSE #------------------------------------------------ ---------------------------- # Name: automaticMemoryManagement #Datatype: Boolean # Description: flag to indicate Automatic Memory Management is used # Valid values : TRUE/FALSE # Default value : TRUE # Mandatory :NO #------------------------------------------------ ---------------------------- automaticMemoryManagement=FALSE #------------------------------------------------ ---------------------------- # Name : totalMemory #Datatype: String # Description: total memory in MB to allocate to Oracle #Valid values: #Default value: # Mandatory :NO #------------------------------------------------ ---------------------------- totalMemory=4096
Execute
cd /u01/app/oracle/product/19c/db_1/bin
./dbca -silent -createDatabase -responseFile /u01/app/oracle/product/19c/db_1/assistants/dbca/dbca.rsp
3. Configuration completed
sqlplus/as sysdba