操作系统是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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8183550/viewspace-669436/