1.Checking the OS Requirements
[root@QD-137 ~]# grep MemTotal /proc/meminfo
MemTotal: 32949816 kB
[root@QD-137 ~]# grep SwapTotal /proc/meminfo
SwapTotal: 16779884 kB
[root@QD-137 ~]# df -k /dev/shm/
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 16474908 0 16474908 0% /dev/shm
[root@QD-137 ~]# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/shm 16G 0 16G 0% /tmp
2.Checking Package Requirements
[root@QD-137 ~]# uname -r
2.6.18-194.el5
[root@QD-137 ~]# rpm -q \
binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libgomp \
libstdc++ \
libstdc++-devel \
make \
numactl-devel \
sysstat \
unixODBC \
unixODBC-devel | grep "not installed"
3.Creating user
[root@QD-137 home]# groupadd oinstall
[root@QD-137 home]# groupadd dba
[root@QD-137 home]# chattr -i /etc/passwd /etc/shadow
[root@QD-137 home]# useradd -g oinstall -G dba oracle
[root@QD-137 home]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@QD-137 home]# chattr +i /etc/passwd /etc/shadow
4.Configuring Kernel Parameters for Linux
[root@QD-137 home]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 34359738368
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 = 1048586
[root@QD-137 home]# sysctl -p
5.Checking Resource Limits for the Oracle Software Installation Users
[root@QD-137 home]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
[root@QD-137 home]# mkdir -p /U01/app/oracle/
[root@QD-137 home]# chown -R oracle:oinstall /U01/
[root@QD-137 home]# chmod -R 775 /U01/
[root@QD-137 home]# vi /etc/pam.d/login
session required pam_limits.so
[root@QD-137 home]# vi /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
6.Configuring the oracle User's Environment
[oracle@bf_test_qd_119 ~]$ vi .bash_profile
export ORACLE_BASE=/U01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.3/db_1
export ORACLE_SID=bfodb
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
export LANG="en_US.UTF-8"
export NLS_LANG=american_AMERICA.UTF8
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
7.upload oracle Software and unzip
[oracle@bf_test_qd_119 U01]$ ll
total 2444460
drwxrwxr-x 3 oracle oinstall 4096 Mar 20 16:00 app
drwxrwxr-x 2 oracle oinstall 16384 Mar 20 14:31 lost+found
-rw-r--r-- 1 root root 1358454646 Mar 20 16:46 p10404530_112030_Linux-x86-64_1of7.zip
-rw-r--r-- 1 root root 1142195302 Mar 20 16:51 p10404530_112030_Linux-x86-64_2of7.zip
[oracle@bf_test_qd_119 U01]$ unzip p10404530_112030_Linux-x86-64_1of7.zip
[oracle@bf_test_qd_119 U01]$ unzip p10404530_112030_Linux-x86-64_2of7.zip
8.chang response file
[oracle@bf_test_qd_119 database]$cd /U01/database/response/
[oracle@bf_test_qd_119 database]$cp db_install.rsp db_install_bfodb.rsp
[oracle@bf_test_qd_119 database]$vi db_install_bfodb.rsp
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=bf_test_qd_119.167.137.13_cnc
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/U01/app/oracle/oraInventory
ORACLE_HOME=/U01/app/oracle/product/11.2.3/db_1
ORACLE_BASE=/U01/app/oracle
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
DECLINE_SECURITY_UPDATES=true
[oracle@bf_test_qd_119 database]$ ./runInstaller -silent -force -noconfig -responseFile /U01/database/response/db_install_bfodb.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 16088 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16386 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-03-20_05-19-18PM. Please wait ...[oracle@bf_test_qd_119 database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2012-03-20_05-19-18PM/installActions2012-03-20_05-19-18PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2012-03-20_05-19-18PM/installActions2012-03-20_05-19-18PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/U01/app/oracle/oraInventory/logs/installActions2012-03-20_05-19-18PM.log
The installation of Oracle Database 11g was successful.
Please check '/U01/app/oracle/oraInventory/logs/silentInstall2012-03-20_05-19-18PM.log' for more details.
As a root user, execute the following script(s):
1. /U01/app/oracle/oraInventory/orainstRoot.sh
2. /U01/app/oracle/product/11.2.3/db_1/root.sh
Successfully Setup Software.
9.使用root
[root@bf_test_qd_119 ~]# /U01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /U01/app/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /U01/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@bf_test_qd_119 ~]# /U01/app/oracle/product/11.2.3/db_1/root.sh
Check /U01/app/oracle/product/11.2.3/db_1/install/root_bf_test_qd_119.167.137.13_cnc_2012-03-20_17-22-51.log for the output of root script
10.配置监听
[oracle@bf_test_qd_119 response]$ $ORACLE_HOME/bin/netca -silent -responsefile /U01/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /U01/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.3/db_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@bf_test_qd_119 response]$ ll /U01/app/oracle/product/11.2.3/db_1/network/admin/
total 16
-rw-r--r-- 1 oracle oinstall 390 Mar 20 17:28 listener.ora
drwxr-xr-x 2 oracle oinstall 4096 Mar 20 17:19 samples
-rw-r--r-- 1 oracle oinstall 205 May 11 2011 shrept.lst
-rw-r--r-- 1 oracle oinstall 219 Mar 20 17:28 sqlnet.ora
11.建库
[oracle@bf_test_qd_119 response]$ vi dbca.rsp
GDBNAME = "bfodb"
SID = "bfodb"
CHARACTERSET = "UTF8"
TOTALMEMORY = "2048"
SOURCEDB = "bf_test_qd_119.167.137.13_cnc:1521:bfodb"
[oracle@bf_test_qd_119 response]$ dbca -silent -responseFile dbca.rsp
Enter SYS user password:
Enter SYSTEM user password:
Copying database files
1% complete
3% complete
11% complete
18% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
[oracle@bf_5001_nj_180 bin]$ ps -ef | grep ora
root 25299 22099 0 11:19 pts/0 00:00:00 su - oracle
oracle 25300 25299 0 11:19 pts/0 00:00:00 -bash
root 27514 27403 0 13:32 pts/1 00:00:00 su - oracle
oracle 27515 27514 0 13:32 pts/1 00:00:00 -bash
oracle 27679 1 0 13:34 ? 00:00:00 ora_pmon_bfodb
oracle 27681 1 0 13:34 ? 00:00:00 ora_psp0_bfodb
oracle 27683 1 0 13:34 ? 00:00:00 ora_vktm_bfodb
oracle 27687 1 0 13:34 ? 00:00:00 ora_gen0_bfodb
oracle 27689 1 0 13:34 ? 00:00:00 ora_diag_bfodb
oracle 27691 1 0 13:34 ? 00:00:00 ora_dbrm_bfodb
oracle 27693 1 0 13:34 ? 00:00:00 ora_dia0_bfodb
oracle 27695 1 0 13:34 ? 00:00:00 ora_mman_bfodb
oracle 27697 1 0 13:34 ? 00:00:00 ora_dbw0_bfodb
oracle 27699 1 0 13:34 ? 00:00:00 ora_dbw1_bfodb
oracle 27701 1 0 13:34 ? 00:00:00 ora_lgwr_bfodb
oracle 27703 1 0 13:34 ? 00:00:00 ora_ckpt_bfodb
oracle 27705 1 0 13:34 ? 00:00:00 ora_smon_bfodb
oracle 27707 1 0 13:34 ? 00:00:00 ora_reco_bfodb
oracle 27709 1 0 13:34 ? 00:00:00 ora_mmon_bfodb
oracle 27711 1 0 13:34 ? 00:00:00 ora_mmnl_bfodb
oracle 27713 1 0 13:34 ? 00:00:00 ora_d000_bfodb
oracle 27715 1 0 13:34 ? 00:00:00 ora_s000_bfodb
oracle 27725 1 0 13:34 ? 00:00:00 ora_qmnc_bfodb
oracle 27749 1 0 13:34 ? 00:00:00 ora_cjq0_bfodb
oracle 27751 1 0 13:34 ? 00:00:00 ora_q000_bfodb
oracle 27753 1 0 13:34 ? 00:00:00 ora_q001_bfodb
oracle 27773 25300 0 13:34 pts/0 00:00:00 ps -ef
oracle 27774 25300 0 13:34 pts/0 00:00:00 grep ora
至此,oracle 11g 静默安装完毕,比图形化界面快多了,也比较简单
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26390465/viewspace-1794499/
,如需转载,请注明出处,否则将追究法律责任。