Oracle 10 g 静态(slient)安装文档

Oracle 10 g 静态(slient)安装环境: redhat 企业4 和企业5都通过了测试(企业5的话要修改下系统参数)10201_database_linux32

针对 Oracle 配置 Linux
创建用于安装和维护 Oracle 数据库 10g 第 2 版软件的 Linux 组和用户帐户。用户帐户将称为 oracle,而组将称为 oinstall 和 dba。以 root 用户身份执行以下命令:
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle


设置 oracle 帐户的口令:
passwd oracle
Ex:
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully

创建目录
以 root 用户身份执行以下命令:
mkdir -p /u01/app/oracle
chown -R oracleinstall /u01/app
chmod -R 775 /u01/app

配置 Linux 内核参数
以root身份登陆,用 vi 命令修改/etc/sysctl.conf 配置文件,加入或者修改如下参数
kernel.shmall = 2097152
kernel.shmmax = 536870912
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=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
修改完后 保存退出 并执行命令
# /sbin/sysctl -p
注意这步一定要做否则修改的文件不会生效的


为 oracle 用户设置 Shell 限制
Oracle 建议对每个 Linux 帐户可以使用的进程数和打开的文件数设置限制。要进行这些更改,以 root 用户的身份执行下列命令:
cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >> /etc/pam.d/login <<EOF
session required /lib/security/pam_limits.so
EOF
修改 bash 和 ksh 的默认配置文件以及 cshell 的默认登录脚本。
cat >> /etc/profile <<EOF
if [ /$USER = "oracle" ]; then
if [ /$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat >> /etc/csh.login <<EOF
if ( /$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
注意 这个也可以用vi直接打开要编辑的文件(我就是用vi打开文件输入并保存的)



限制oracle环境变量
编辑 /home/oracle/.bash_profile。
添加以下行:
umask 022
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/binPATH
export PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID

注意这个要视你的oracle情况而定啦我装的是oraccle10.2.0.1所以我的ORACLE_HOME就设置如上了。


修改系统版本 (如果是rehat企业版5 )

vi /etc/redhat-release
redhat-4
#Red Hat Enterprise Linux Server release 5 (Tikanga)

因为oracle 的官方只支持到RHEL4为止,所以要修改版本说明,把Red Hat Enterprise Linux Server release 5 (Tikanga) 注释掉,前面加上一行redhat-4,当然oracle安装完成后,要修改回来。redhat-4 必须为redhat-release文件的第一行,否则安装时还会报警告。

到此为止linux的系统设置完成了具体请参考
10201_database_linux32.zip压缩包内的welcome.html ,里面有详细的英文安装帮助也可以参考如下几个网址:
《在 Linux x86 上安装 Oracle 数据库 10g》
http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html#config
《将 Oracle Enterprise Linux 5 和 Oracle 数据库 11g 第 1 版安装并配置为 Oracle VM Server 上的超虚拟化机 (PVM)》
http://www.oracle.com/technology/global/cn/obe/ovm/ovmel5pvmdb11gr1/ovmel5pvmdb11gr1.htm#t3
《在 Oracle Enterprise Linux 5 (32 位和 64 位)上安装 Oracle 数据库 11g 第 1 版》
http://www.oracle.com/technology/global/cn/pub/articles/smiley-11gr1-install.html

第二部分 配置静态安装文件
静态安装文件是预先设置好参数了,那么等oracle安装的时候要手工输入的都可以直接读取静态安装文件(当然是x界面的啦)。如果你用x界面的操作系统那么,按着界面提示一步步完成也是一样的。
把10201_database_linux32.zip文件解压后 得到database目录,
/home/oracle/database/response下有有enterprise.rsp、standard.rsp和custom.rsp三个应答文件,分别对应企业版、标准版和定制的安装。
我们以以enterprise.rsp为例:<Value Unspecified>基本上是要填的有些可以不填
UNIX_GROUP_NAME="oinstall"
ORACLE_HOME_NAME="OraDb10g_home1"
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"
SHOW_INSTALL_PROGRESS_PAGE= true
SHOW_END_OF_INSTALL_MSGS= true
COMPONENT_LANGUAGES={"zh_CN"}
s_nameForDBAGrp= "dba"
s_nameForOPERGrp="dba"
INSTALL_TYPE="EE"
n_configurationOption=3
RESTART_SYSTEM=false
RESTART_REMOTE_SYSTEM=false

说明:这几项要视情况而定比如说 UNIX_GROUP_NAME="oinstall"
和s_nameForDBAGrp= "dba" s_nameForOPERGrp="dba"
还有环境变量都要参照前面自己定义好的来填


第三部分 开始安装


换oracle用户登录:注意文件位置视自己刚刚修改的文件位置而定
./runInstaller -silent -responseFile /home/oracle/database/response/enterprise.rsp

Installation in progress (Mon Sep 21 23:37:00 CST 2009)
............................................................... 18% Done.
............................................................... 36% Done.
............................................................... 54% Done.
............................................................... 72% Done.
................ 76% Done.
Install successful
Linking in progress (Mon Sep 21 23:39:49 CST 2009)
Link successful
Setup in progress (Mon Sep 21 23:43:11 CST 2009)
.............. 100% Done.
Setup successful
End of install phases.(Mon Sep 21 23:43:20 CST 2009)
WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.
To register the new inventory please run the script '/u01/app/oracle/oraInventory/orainstRoot.sh' with root privileges.
If you do not register the inventory, you may not be able to update or patch the products you installed.
The following configuration scripts
/u01/app/oracle/product/10.2.0/db_1/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.(恭喜你成功了如果没这个提示就看看他说的日志继续修改下ok)
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2009-09-21_11-36-22PM.log' for more details.


接下来按提示 操作, root身份登录
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh

第四部分 增加数据实例

修改/home/oracle/database/response/dbca.rsp(就是解压安装文件目录下的)
根据数据库建立方式的不同编辑不同的数据库库选项。
比如在本次安装过程中设置了下列参数:(注意下面参数视情况而定啦不要照抄该选项原文件都有说明的)
RESPONSEFILE_VERSION = "10.0.0"
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl"
SID = "orcl"
TEMPLATENAME = "New_Database.dbt"
SYSPASSWORD = "passwd"
SYSTEMPASSWORD = "passwd"
DATAFILEDESTINATION ="/u01/app/oracle/oradata/"
RECOVERYAREADESTINATION="/u01/app/oracle/flash_recovery_area"
STORAGETYPE=FS
CHARACTERSET = "ZHS16GBK"
MEMORYPERCENTAGE = "40"
SCRIPTDESTINATION ="/u01/app/oracle/admin/ora10g/scripts"
EMCONFIGURATION=”LOCAL”
SYSMANPASSWORD = "passwd"
DBSNMPPASSWORD = "passwd"
其中最后1项不是必须的,这个的目的是在建立数据库的同时生成脚本。
下面就可以开始SILENT模式的数据库创建了。

dbca -silent -responseFile /home/oracle/dbca.rsp

最后提示创建成功后

用root执行如下脚本:
/u01/app/oracle/oraInventory/orainstRoot.sh

注意/home/oracle/database/response/根据dbca.rsp所在位置定

这里视情况而定 根据 oracle的home目录来找这个文件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值