首页 > 数据库 > Oracle > centos 7.4静默安装oracle 19.3
[root@oracle19c ~]# yum install -y bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel libxcb libibverbs make smartmontools sysstat unzip zip
[root@oracle19c ~]#
[root@oracle19c ~]# groupadd oinstall
[root@oracle19c ~]# groupadd dba
[root@oracle19c~]# useradd -g oinstall oracle
[root@oracle19c ~]# vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 16451328
kernel.shmmax = 33692319744
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 = 1048576
[root@oracle19c ~]# sysctl -p
[root@oracle19c ~]# vim /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard nproc 16384
oracle soft nproc 2047
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 3145728
oracle soft memlock 3145728
[root@oracle19c ~]#
[root@oracle19c ~]# vim /etc/pam.d/login
session required /lib/security/
pam_limits.so
[root@oracle19c ~]# vim /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
[root@oracle19c ~]#
[root@oracle19c ~]# mkdir -p /u01/oracle/app/oracle/product/19.0.0
[root@oracle19c ~]# mkdir -p /u01/oracle/oraInventory
[root@oracle19c ~]# chown -R oracle:oinstall /u01
[root@oracle19c ~]# vim /home/oracle/.bash_profile
export ORACLE_BASE=/u01/oracle/
export ORACLE_HOME=$ORACLE_BASE/app/oracle/product/19.0.0
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/lib
[root@oracle19c ~]#
[root@oracle19c ~]# su - oracle
[oracle@oracle19c ~]$ unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME #必须解压到ORACLE_HOME目录
[oracle@oracle19c 19.0.0]$ vim install/response/db_install.rsp
[oracle@oracle19c 19.0.0]$ grep -v '^#' install/response/db_install.rsp | grep -v '^$'
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/oracle/oraInventory
ORACLE_HOME=/u01/oracle/app/oracle/product/19.0.0
ORACLE_BASE=/u01/oracle/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=oinstall
oracle.install.db.OSOPER_GROUP=oinstall
oracle.install.db.OSBACKUPDBA_GROUP=oinstall
oracle.install.db.OSDGDBA_GROUP=oinstall
oracle.install.db.OSKMDBA_GROUP=oinstall
oracle.install.db.OSRACDBA_GROUP=oinstall
oracle.install.db.rootconfig.executeRootScript=true
oracle.install.db.rootconfig.configMethod=ROOT
oracle.install.db.rootconfig.sudoPath=
oracle.install.db.rootconfig.sudoUserName=
oracle.install.db.CLUSTER_NODES=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.ConfigureAsContainerDB=
oracle.install.db.config.PDBName=
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=4096
oracle.install.db.config.starterdb.installExampleSchemas=
oracle.install.db.config.starterdb.password.ALL=System135
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.password.PDBADMIN=
oracle.install.db.config.starterdb.managementOption=
oracle.install.db.config.starterdb.omsHost=
oracle.install.db.config.starterdb.omsPort=
oracle.install.db.config.starterdb.emAdminUser=
oracle.install.db.config.starterdb.emAdminPassword=
oracle.install.db.config.starterdb.enableRecovery=
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
[oracle@oracle19c 19.0.0]$
[root@oracle19c ~]# su - oracle
Last login: Mon Jun 26 15:35:33 CST 2023 on pts/3
[oracle@oracle19c ~]$ cd $ORACLE_HOME
[oracle@oracle19c 19.0.0]$ ./runInstaller -force -silent -noconfig -ignorePrereq -responseFile /u01/oracle/app/oracle/product/19.0.0/install/response/db_install.rsp
Launching Oracle Database Setup Wizard...
Enter password for 'root' user:
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2023-06-26_03-34-10PM.log
ACTION: Identify the list of failed prerequisite checks from the log: installActions2023-06-26_03-34-10PM.log. Then either from the log file or from installation manual find the appropria
te configuration to meet the prerequisites and fix it manually.The response file for this session can be found at:
/u01/oracle/app/oracle/product/19.0.0/install/response/db_2023-06-26_03-34-10PM.rsp
You can find the log of this install session at:
/tmp/InstallActions2023-06-26_03-34-10PM/installActions2023-06-26_03-34-10PM.log
Successfully Setup Software with warning(s).
Moved the install session logs to:
/u01/oracle/oraInventory/logs/InstallActions2023-06-26_03-34-10PM
[oracle@oracle19c 19.0.0]$
[oracle@oracle19c 19.0.0]$ exit
logout
[root@oracle19c ~]# sh /u01/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@oracle19c ~]# sh /u01/oracle/app/oracle/product/19.0.0/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/app/oracle/product/19.0.0
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@oracle19c ~]#
[oracle@oracle19c ~]$ netca -silent -responsefile /u01/oracle/app/oracle/product/19.0.0/assistants/netca/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /u01/oracle/app/oracle/product/19.0.0/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/oracle/app/oracle/product/19.0.0/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@oracle19c ~]$ lsnrctl start
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 26-JUN-2023 15:42:49
Copyright (c) 1991, 2019, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
[oracle@oracle19c ~]$ netstat -antulp | grep 1521
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::1521 :::* LISTEN 27046/tnslsnr
tcp6 0 0 127.0.0.1:1521 127.0.0.1:18384 TIME_WAIT -
tcp6 0 0 127.0.0.1:1521 127.0.0.1:18478 TIME_WAIT -
[oracle@oracle19c ~]$
[oracle@oracle19c 19.0.0]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -responseFile /u01/oracle/app/oracle/product/19.0.0/assistants/dbca/dbca.rsp
Enter SYS user password:
Enter SYSTEM user password:
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
69% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/u01/oracle/app/oracle/cfgtoollogs/dbca/orcl.
Database Information:
Global Database Name:orcl
System Identifier(SID):orcl
Look at the log file "/u01/oracle/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
[oracle@oracle19c 19.0.0]$
[oracle@oracle19c 19.0.0]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 26 16:00:30 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select * from dual;
D
-
X
SQL>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25854343/viewspace-2773569/ ,如需转载,请注明出处,否则将追究法律责任。