Oracle 10g (10201)靜默安裝

edwardking888發表於2010-07-26

作業系統是Red Hat Enterprise Linux
Server release 5 (Tikanga)

1.設定環境變數

# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compatlibstdc++-
devel

OS引數要求vi /etc/sysctl.conf , 在行末新增以下內容

#use for oracle
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144

net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

 

再執行sysctl -p應用以上引數

vi /etc/security/limits.conf

#use for oracle
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536

vi /etc/pam.d/login

行末新增以下內容
session required pam_limits.so

vi /etc/selinux/config 確保以下內容
SELINUX=disabled

建立安裝Oracle的使用者、組及配置

#groupadd oinstall
#groupadd dba
#useradd -m -g oinstall -G dba oracle
#id oracle
為Oracle 使用者設定密碼:
#passwd oracle

# chown -R oracle.oinstall /opt/app/oracle/product/10.2
# chmod -R 775 /opt/app/oracle/product/10.2

設定oracle使用者的.bash_profile

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2/; export ORACLE_HOME
ORACLE_SID=XXX; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
PATH=$ORACLE_HOME/dbs:$PATH; export PAT
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

 

設定主機名和ip
vi /etc/hosts

內容:60.12.128.186 zjinterface testdbserver

#service network restart

設定Oracle10g支援RHEL5的引數

編輯檔案 /etc/redhat-release 把Red Hat Enterprise Linux
Server release 5 (Tikanga) 改成版本4:redhat-4

在/etc目錄下建立一個名為 oraInst.loc 的檔案,檔案中的內容(兩行程式碼)如下:
inventory_loc=/u01/oracle/oraInventory
inst_group= oinstall

修改配置檔案

複製/oracle/database/response目錄下面的enterprise.rsp檔案檔案到根目錄下

(參考/oracle/database/response目錄下面的enterprise.rsp檔案,該目錄下有三個檔案enterprise.rsp(企業版靜默安裝檔案),standard.rsp(標準版靜默安裝檔案)和custom.rsp(客戶版靜默安裝檔案),另外還有其他三個靜默安裝檔案)。

修改enterprise.rsp檔案資訊

UNIX_GROUP_NAME=oinstall

ORACLE_HOME="/u01/oracle/product/10.2/"

ORACLE_HOME_NAME="OraDb10g_home1"

n_configurationOption=3     #              3 - Install Software Only

[oracle@oraclebk database]./runInstaller -silent -responseFile /tools/database/enterprise.rsp

注意:enterprise.rsp前面要寫完整的全路徑資訊

Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-07-26_10-58-09AM. Please wait ...[oracle@oraclebk database]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.

You can find a log of this install session at:
 /u01/oracle/oraInventory/logs/installActions2010-07-26_10-58-09AM.log
.................................................................................................... 100% Done.


Loading Product Information
..................................................................................................................... 100% Done.


Analyzing dependencies
.........................................................
Starting execution of Prerequisites...
Total No of checks: 11

Performing check for CertifiedVersions
Checking operating system requirements ...
Expected result: One of redhat-3,redhat-4,SuSE-9
Actual Result: redhat-4
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for Packages
Checking operating system package requirements ...
Checking for make-3.79; found make-1:3.81-3.el5.        Passed
Checking for binutils-2.15; found binutils-2.17.50.0.6-12.el5.  Passed
Checking for gcc-3.2; found gcc-4.1.2-46.el5.   Passed
Checking for libaio-0.3.96; found libaio-0.3.106-3.2.   Passed
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for Kernel
Checking kernel parameters
Checking for semmsl=250; found semmsl=250.      Passed
Checking for semmns=32000; found semmns=32000.  Passed
Checking for semopm=100; found semopm=100.      Passed
Checking for semmni=128; found semmni=128.      Passed
Checking for shmmax=536870912; found shmmax=8147483648. Passed
Checking for shmmni=4096; found shmmni=4096.    Passed
Checking for shmall=2097152; found shmall=2097152.      Passed
Checking for file-max=65536; found file-max=65536.      Passed
Checking for VERSION=2.6.9; found VERSION=2.6.18-164.el5.       Passed
Checking for ip_local_port_range=1024 - 65000; found ip_local_port_range=1024 - 65000.  Passed
Checking for rmem_default=262144; found rmem_default=262144.    Passed
Checking for rmem_max=262144; found rmem_max=262144.    Passed
Checking for wmem_default=262144; found wmem_default=262144.    Passed
Checking for wmem_max=262144; found wmem_max=262144.    Passed
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for GLIBC
Checking Recommended glibc version
Expected result: ATLEAST=2.3.2-95.27
Actual Result: 2.5-42
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for TotalMemory
Checking physical memory requirements ...
Expected result: 922MB
Actual Result: 16044MB
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for SwapSpace
Checking available swap space requirements ...
Expected result: 12033MB
Actual Result: 18047MB
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for DetectIfDHCPAssignedIP
Checking Network Configuration requirements ...
Check complete. The overall result of this check is: Not executed <<<<


Check complete: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP addresses.  However, the primary network interface on the system should be configured with a static IP address in order for the Oracle Software to function properly.  See the Installation Guide for more details on installing the software on systems configured with DHCP.

=======================================================================
Performing check for OracleBase
Validating ORACLE_BASE location (if set) ...
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for OracleHomeSpace
Checking Oracle Home path for spaces...
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for DetectAnyInvalidASMHome
Checking for proper system clean-up....
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
Performing check for CompatibilityChecks
Checking for Oracle Home incompatibilities ....
Actual Result: NEW_HOME
Check complete. The overall result of this check is: Passed


Check complete: Passed
=======================================================================
PrereqChecks complete

........................................... 100% Done.


-----------------------------------------------------------------------------
Summary
Global Settings
    Source: /opt/database/stage/products.xml
    Oracle Home: /u01/oracle/product/10.2 (OraDb10g_home1)
    Installation Type: Enterprise Edition
Product Languages
   English
Space Requirements
   / Required 1.74GB (includes 130MB temporary) : Available 478.27GB
New Installations (109 products)
   Oracle Database 10g 10.2.0.1.0
   Enterprise Edition Options 10.2.0.1.0
   Oracle Partitioning 10.2.0.1.0
   Oracle Spatial 10.2.0.1.0
   Oracle OLAP 10.2.0.1.0
   Oracle Enterprise Manager Console DB 10.2.0.1.0
   Oracle Net Services 10.2.0.1.0
   Oracle Database 10g 10.2.0.1.0
   Oracle Net Listener 10.2.0.1.0
   HAS Files for DB 10.2.0.1.0
   Oracle Internet Directory Client 10.2.0.1.0
   Oracle Call Interface (OCI) 10.2.0.1.0
   Oracle Programmer 10.2.0.1.0
   Oracle interMedia 10.2.0.1.0
   Enterprise Manager Agent Core 10.2.0.1.0
   Oracle JVM 10.2.0.1.0
   Database Configuration and Upgrade Assistants 10.2.0.1.0
   Oracle interMedia Locator 10.2.0.1.0
   Oracle XML Development Kit 10.2.0.1.0
   Oracle Text 10.2.0.1.0
   Oracle Database Utilities 10.2.0.1.0
   Generic Connectivity Common Files 10.2.0.1.0
   Oracle Advanced Security 10.2.0.1.0
   Enterprise Manager Repository Core 10.2.0.1.0
   PL/SQL 10.2.0.1.0
   Oracle Net 10.2.0.1.0
   Assistant Common Files 10.2.0.1.0
   Oracle Notification Service 10.1.0.3.0
   Enterprise Manager plugin Common Files 10.2.0.1.0 Beta
   Buildtools Common Files 10.2.0.1.0
   Installation Common Files 10.2.0.1.0
   Oracle LDAP administration 10.2.0.1.0
   Oracle Java Client 10.2.0.1.0
   Oracle Recovery Manager 10.2.0.1.0
   SQL*Plus 10.2.0.1.0
   iSQL*Plus 10.2.0.1.0
   Enterprise Manager plugin Common Files 10.2.0.1.0
   Oracle Help for the  Web 1.1.10.0.0
   HAS Common Files 10.2.0.1.0
   Oracle Clusterware RDBMS Files 10.2.0.1.0
   Oracle Wallet Manager 10.2.0.1.0
   Enterprise Manager Minimal Integration 10.2.0.1.0
   Oracle Database User Interface 2.2.13.0.0
   Precompiler Common Files 10.2.0.1.0
   Secure Socket Layer 10.2.0.1.0
   Oracle ODBC Driver 10.2.0.1.0
   Database SQL Scripts 10.2.0.1.0
   OLAP SQL Scripts 10.2.0.1.0
   PL/SQL Embedded Gateway 10.2.0.1.0
   Required Support Files 10.2.0.1.0
   Character Set Migration Utility 10.2.0.1.0
   LDAP Required Support Files 10.2.0.1.0
   Oracle JDBC Thin Driver for JDK 1.4 10.2.0.1.0
   Oracle JDBC Thin Driver for JDK 1.2 10.2.0.1.0
   Oracle interMedia Client Option 10.2.0.1.0
   Oracle Required Support Files 32 bit 10.2.0.0.0
   Oracle Code Editor 1.2.1.0.0I
   Oracle Globalization Support 10.2.0.1.0
   JDBC Common Files 10.2.0.1.0
   Oracle Locale Builder 10.2.0.1.0
   Oracle Containers for Java 10.2.0.1.0
   Database Workspace Manager 10.2.0.1.0
   Oracle Core Required Support Files 10.2.0.1.0
   Platform. Required Support Files 10.2.0.1.0
   Oracle interMedia Locator RDBMS Files 10.2.0.1.0
   Oracle JDBC/OCI Instant Client 10.2.0.1.0
   Oracle interMedia Annotator 10.2.0.1.0
   SQLJ Runtime 10.2.0.1.0
   Oracle interMedia Java Advanced Imaging 10.2.0.1.0
   Oracle Database 10g interMedia Files 10.2.0.1.0
   Oracle Data Mining RDBMS Files 10.2.0.1.0
   Enterprise Manager Baseline 10.2.0.1.0
   Oracle Help For Java 4.2.6.1.0
   Oracle UIX 2.1.22.0.0
   XML Parser for Java 10.2.0.1.0
   Precompiler Required Support Files 10.2.0.1.0
   XML Parser for Oracle JVM 10.2.0.1.0
   Oracle Database 10G 32 bit 10.2.0.1.0
   Oracle Message Gateway Common Files 10.2.0.1.0
   Oracle Starter Database 10.2.0.1.0
   Sample Schema Data 10.2.0.1.0
   Parser Generator Required Support Files 10.2.0.1.0
   Agent Required Support Files 10.2.0.1.0
   Oracle RAC Required Support Files-HAS 10.2.0.1.0
   RDBMS Required Support Files 10.2.0.1.0
   RDBMS Required Support Files for Instant Client 10.2.0.1.0
   XDK Required Support Files 10.2.0.1.0
   Oracle OLAP API 10.2.0.1.0
   Oracle OLAP RDBMS Files 10.2.0.1.0
   DBJAVA Required Support Files 10.2.0.1.0
   SQL*Plus Required Support Files 10.2.0.1.0
   Oracle JFC Extended Windowing Toolkit 4.2.33.0.0
   Oracle Ice Browser 5.2.3.6.0
   regexp 2.1.9.0.0
   Oracle Extended Windowing Toolkit 3.4.38.0.0
   Enterprise Manager Common Files 10.2.0.1.0
   Enterprise Manager Agent DB 10.2.0.1.0
   Oracle Net Required Support Files 10.2.0.1.0
   Enterprise Manager Repository DB 10.2.0.1.0
   Oracle Display Fonts 9.0.2.0.0
   SSL Required Support Files for InstantClient 10.2.0.1.0
   Bali Share 1.1.18.0.0
   Perl Interpreter 5.8.3.0.2
   Oracle Universal Installer 10.2.0.1.0
   Oracle One-Off Patch Installer 10.2.0.1.0
   Installer SDK Component 10.2.0.1.0
   Java Runtime Environment 1.4.2.0.8
   Java 2 SDK 1.4.2.0.8
   Sun JDK extensions 10.1.2.0.0
-----------------------------------------------------------------------------


Installation in progress (Mon Jul 26 10:58:20 HKT 2010)
...............................................................  14% Done.
...............................................................  28% Done.
...............................................................  42% Done.
...............................................................  56% Done.
...............................................................  70% Done.
................                                                 74% Done.
Install successful

Linking in progress (Mon Jul 26 10:59:21 HKT 2010)
.                                                                74% Done.
Link successful

Setup in progress (Mon Jul 26 11:00:47 HKT 2010)
..................                                              100% Done.
Setup successful

End of install phases.(Mon Jul 26 11:00:49 HKT 2010)
WARNING:The following configuration scripts
/u01/oracle/product/10.2/root.sh
need to be executed as root for configuring the system. If you skip the execution of the configuration tools, the configuration will not be complete and the product wont function properly. In order to get the product to function properly, you will be required to execute the scripts and the configuration tools after exiting the OUI.
 
The installation of Oracle Database 10g was successful.
Please check '/u01/oracle/oraInventory/logs/silentInstall2010-07-26_10-58-09AM.log' for more details.

[oracle@oraclebk database]$ cat /u01/oracle/oraInventory/logs/silentInstall2010-07-26_10-58-09AM.log
silentInstall2010-07-26_10-58-09AM.log
WARNING:The following configuration scripts
/u01/oracle/product/10.2/root.sh
need to be executed as root for configuring the system. If you skip the execution of the configuration tools, the configuration will not be complete and the product wont function properly. In order to get the product to function properly, you will be required to execute the scripts and the configuration tools after exiting the OUI.
 
The installation of Oracle Database 10g was successful.

 # /u01/oracle/product/10.2/root.sh

Running Oracle10 root.sh script...


The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/oracle/product/10.2


Enter the full pathname of the local bin directory: [/usr/local/bin]: 

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...



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.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8183550/viewspace-669436/,如需轉載,請註明出處,否則將追究法律責任。

相關文章