您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Oracle 11g数据库软件静默安装

2024/4/11 2:43:21发布13次查看
一.准备文件 1. 拷贝文件 linux.x64_11gr2_database_1of2.zip linux.x64_11gr2_database_2of2.zip 到 /oracle目录下; 2. 解压(可
一.准备文件
 1. 拷贝文件 linux.x64_11gr2_database_1of2.zip
 linux.x64_11gr2_database_2of2.zip 到 /oracle目录下;
2. 解压(可用鼠标右击解压,或用口令, cd /oracle)
[root@jyrac1 /]# uzip linux.x64_11gr2_database_1of2.zip
[root@jyrac1 /]# uzip linux.x64_11gr2_database_2of2.zip
3. 在/etc目录下创建一个名为 orainst.loc 的文件,文件中的内容(两行代码)如下:
 inventory_loc=oracle_base/orainventory
 inst_group= oinstall
[root@jyrac1 /]# vi /etc/orainst.loc
nventory_loc=oracle_base/orainventory
inst_group= oinstall
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
/etc/orainst.loc [new] 2l, 59c written
4. 输入下面的命令在orainst.loc文件上设置合适的拥有者,组和权限:
[root@jyrac1 /]# cd /etc
[root@jyrac1 etc]# chown oracle:oinstall orainst.loc
[root@jyrac1 etc]# chmod 664 orainst.loc
二.检查硬件需求
 1. 查看系统物理内存,以下输出可以看出,有2g的内存,内存最低要求1g
[root@jyrac1 etc]# grep memtotal /proc/meminfo
memtotal:      2059568 kb
2. 查看交换空间大小,以下输出可以看出,,有2g的交换空间,交换空间的最优设置与你物理内存大小相关,详细说明请参考安装文档
[root@jyrac1 etc]# grep swaptotal /proc/meminfo
swaptotal:    2096472 kb
3.查看可用物理内存和交换空间
[root@jyrac1 etc]# free
            total      used      free    shared    buffers    cached
mem:      2059568    856296    1203272          0      59336    574832
-/+ buffers/cache:    222128    1837440
swap:      2096472    120740    1975732
4.查看挂载的临时分区空间情况
[root@jyrac1 etc]# df
filesystem          1k-blocks      used available use% mounted on
/dev/sda1            16246428  10361032  5046808  68% /
/dev/sda2              2030768  1124784    801160  59% /tmp
tmpfs                  1029784        0  1029784  0% /dev/shm
/dev/sdb              10321208    162284  9634636  2% /u01
三.检查软件需求
 1.查看linux版本
[root@jyrac1 etc]# cat /etc/issue
red hat enterprise linux server release 5.4 (tikanga)
kernel \r on an \m
2.查看内核版本
[root@jyrac1 etc]# uname -a
linux jyrac1 2.6.18-164.el5 #1 smp tue aug 18 15:51:48 edt 2009 x86_64 x86_64 x86_64 gnu/linux
四.配置内核及其他参数
 1.vi /etc/sysctl.conf
kernel.shmall = 4294967296
kernel.shmmni=4096
kernel.sem=250 32000 100 128
fs.file-max=6815744
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 = 1048576
fs.aio-max-nr= 3145728
[root@jyrac1 /]# /sbin/sysctl -p
2.vi /etc/security/limits.conf
oracle soft nproc  2047
oracle hard nproc  16384
oracle soft nofile 1024
oracle hard nofile 65536
3.vi /etc/pam.d/login
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session required pam_limits.so
4. vi /etc/selinux/config
selinux=disabled
五.添加用户组和用户,并为oracle用户设置密码
[root@lym server]# groupadd oinstall
[root@lym server]# groupadd dba
[root@lym server]# groupadd oper
[root@lym server]# useradd -g oinstall -g dba oracle
[root@lym server]# passwd oracle
changing password for user oracle.
new unix password:
retype new unix password:
passwd: all authentication tokens updated successfully.
六.创建安装oracle的文件夹,并设置其相应权限给oracle用户
[root@jyrac1 /]# mkdir -p  /u01/app/oracle/11.2.0/db
[root@jyrac1 /]# chown -r oracle.oinstall /u01
[root@jyrac1 /]# chmod 775 /u01
七.设置oracle环境变量
[oracle@jyrac1 ~]$ vi .bash_profile
# .bash_profile
# get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# user specific environment and startup programs
path=$path:$home/bin
export path
temp=/u01/tmp
tmpdir=/u01/tmp
export temp tmpdir
export ld_assume_kernel=2.6.9
export oracle_base=/u01/app/oracle
export oracle_home=/u01/app/oracle/11.2.0/db
export oracle_sid=jycs
export nls_lang=american_america.zhs16gbk
export ora_nls33=$oracle_home/ocommon/nls/admin/data
ld_library_path=$oracle_home/lib:/lib:/usr/lib
ld_library_path=$ld_library_path:/usr/local/lib
export ld_library_path
export path=$path:$oracle_home/bin
classpath=$oracle_home/jre:$oracle_home/jlib:$oracle_home/rdbms/jlib
classpath=$classpath:$oracle_home/network/jlib
export classpath
八.注销root用户,并登录oracle用户,在/home/oracle目录下建立一个名为enterprisejy.rsp的文件,里面的具体内容如下(参考/oracle/database/response目录下面的db_install.rsp文件.
[oracle@jyrac1 ~]$ vi enterprisejy.rsp
#以下参数不要更改
racle.install.responsefileversion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=install_db_swonly
decline_security_updates=false
#以下参数根据实际情况更改
unix_group_name=oinstall
inventory_location=/u01/orainventory
selected_languages=en,zh_cn,zh_tw
oracle_home=/u01/app/oracle/11.2.0/db
oracle_base=/u01/app/oracle
oracle.install.db.installedition=ee
oracle.install.db.iscustominstall=true
oracle.install.db.customcomponents=oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
oracle.install.db.dba_group=dba
oracle.install.db.oper_group=oinstall
~
~
~
~
~
enterprisejy.rsp [new] 15l, 679c written
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product