Install Oracle Database 11gR2 (11.2.0.1) in silent mode on AIX

Step 1: check /etc/hosts

>cat /etc/hosts
10.10.10.10      pp1a

Step 2: create group

>mkgroup -A id=54321 oinstall
>mkgroup -A id=54322 dba
>mkgroup -A id=54323 oper

Step 3: create oracle user

>useradd -u 54321 -g oinstall -G dba,oper -d /home/oracle oracle 
>id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54323(oper),54322(dba)

>mkdir /home/oracle
>chown oracle.oinstall /home/oracle

Step 4: Config AIX enviroment

/usr/sbin/no -p -o udp_sendspace=65536
/usr/sbin/no -p -o udp_recvspace=655360
/usr/sbin/no -p -o tcp_sendspace=65536
/usr/sbin/no -p -o tcp_recvspace=65536
/usr/sbin/no -p -o rfc1323=1
/usr/sbin/no -p -o sb_max=4194304
/usr/sbin/no -r -o ipqmaxlen=512

>/usr/sbin/no -L | grep space
tcp_recvspace             64K    16K    64K    4K     8E-1   byte              C
tcp_sendspace             64K    16K    64K    4K     8E-1   byte              C
udp_recvspace             640K   42080  640K   4K     8E-1   byte              C
udp_sendspace             64K    9K     64K    4K     8E-1   byte              C

>/usr/sbin/no -L | grep rfc1323
rfc1323                   1      0      1      0      1      boolean           C

>/usr/sbin/no -L | grep max
nbc_max_cache             128K   128K   128K   1      20G    byte              D
     nbc_max_cache
sb_max                    4M     1M     4M     4K     8E-1   byte              D
...
ipqmaxlen                 100    100    512    100    2G-1   numeric           R
...

Step 5: config oracle security limits

>vi /etc/security/limits
oracle:
        fsize = -1
        core = 2097151
        cpu = -1
        data = -1
        rss = -1
        stack = -1
        nofiles = -1

Step 6: edit oracle .profile

>su - oracle
>vi .profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=ORCL
export PATH=/usr/sbin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$HOME/bin:$PATH

>. ~/.profile

Step 7: unzip Oracle Install File

>mkdir -p $ORACLE_HOME
>unzip aix.ppc64_11gR2_database_1of2.zip
>unzip aix.ppc64_11gR2_database_2of2.zip

Step 8: edit install response file for install software only

>cd database/response
>cp db_install.rsp db_install.rsp.bak
>vi db_install.rsp

oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=pp1a
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=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.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
DECLINE_SECURITY_UPDATES=true

Step 9: execute rootpre.sh by root

>su -
>sh rootpre.sh
rootpre.sh output will be logged in /tmp/rootpre.out_22-03-15.11:54:53
Saving the original files in /etc/ora_save_22-03-15.11:54:53....
Copying new kernel extension to /etc....
Loading the kernel extension from /etc

 Oracle Kernel Extension Loader for AIX 
       Copyright (c) 1998,1999 Oracle Corporation 


 Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0xa0c31000
 Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0xa0c31000
The kernel extension was successfuly loaded.

Checking if group services should be configured....
Nothing to configure.

Step 10: execute runInstaller in silent mode by oracle (the '/u01/src/database' is unzip path)

>su - oracle
>cd /u01/src/database
>./runInstaller -ignoreSysPrereqs -silent -responseFile /u01/src/database/response/db_install.rsp

********************************************************************************

Your platform requires the root user to perform certain pre-installation
OS preparation.  The root user should run the shell script 'rootpre.sh' before
you proceed with Oracle installation.  rootpre.sh can be found at the top level 
of the CD or the stage area.

Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle 
installation.
Answer 'n' to abort installation and then ask root to run 'rootpre.sh'.

********************************************************************************

Has 'rootpre.sh' been run by root? [y/n] (n)
y

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 190 MB.   Actual 4858 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16384 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2022-03-15_11-58-48AM. Please wait ...oracle@pp1a/u01/src/database>[WARNING] [INS-13001] Environment does not meet minimum requirements.
   CAUSE: Minimum requirements were not met for this environment
   ACTION: Either check the logs for more information or check the supported configurations for this product.
[WARNING] [INS-13001] Environment does not meet minimum requirements.
   CAUSE: Minimum requirements were not met for this environment
   ACTION: Either check the logs for more information or check the supported configurations for this product.
You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2022-03-15_11-58-48AM.log

Step 11: execute root.sh by root (the 'root.sh' path on $ORACLE_HOME)

>su -
>sh /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /u01/app/oracle/product/11.2.0/dbhome_1/install/root_pp1a_2022-03-15_13-06-48.log for the output of root script

>cat /u01/app/oracle/product/11.2.0/dbhome_1/install/root_pp1a_2022-03-15_13-06-48.log

Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Creating /etc/oratab file...
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.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

Step 12: Install listener in silent mode

>export DISPLAY=localhost:0.0
>netca -silent -responsefile /u01/src/database/response/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /u01/src/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

Step 13: Install database in silent mode

dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbName ORCL -sid ORCL \
-sysPassword oracle -systemPassword oracle \
-characterSet AL32UTF8 \
-storageType FS \
-databaseType MULTIPURPOSE \
-totalMemory 10240 \
-redoLogFileSize 1024 \
-datafileDestination /oracle/oradata

Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 37%
Creating and starting Oracle instance
DBCA_PROGRESS : 40%
DBCA_PROGRESS : 45%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 55%
DBCA_PROGRESS : 56%
DBCA_PROGRESS : 60%
DBCA_PROGRESS : 62%
Completing Database Creation
DBCA_PROGRESS : 66%
DBCA_PROGRESS : 70%
DBCA_PROGRESS : 73%
DBCA_PROGRESS : 85%
DBCA_PROGRESS : 96%
DBCA_PROGRESS : 100%
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/ORCL.
Database Information:
Global Database Name:ORCL
System Identifier(SID):ORCL

Note: Delete database in silent mode

dbca -silent -deleteDatabase -sourceDB ORCL -sysDBAUserName sys -sysDBAPassword oracle

The Database Configuration Assistant will delete the Oracle instance and datafiles for your database. All information in the database will be destroyed. Do you want to proceed?
Connecting to database
DBCA_PROGRESS : 4%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 14%
DBCA_PROGRESS : 19%
DBCA_PROGRESS : 23%
DBCA_PROGRESS : 28%
DBCA_PROGRESS : 47%
Updating network configuration files
DBCA_PROGRESS : 48%
DBCA_PROGRESS : 52%
Deleting instance and datafiles
DBCA_PROGRESS : 76%
DBCA_PROGRESS : 100%
Database deletion completed.

張貼留言

0 留言