静默安装Oracle的准备工作

7 篇文章 0 订阅
1 篇文章 0 订阅

非图像界面安装——Oracle静默安装方式有时候是DBA们不得不选择的安装方式,因为在公司的具体环境中,服务器端口可能会有一些问题。下面就来看看静默安装Oracle的准备工作有哪些吧!


1、下载:在Oracle官网上下载64位Linux Oracle11gR1 的安装包linux.x64_11gR1_database_1013.zip


2、上传:到Linux


3、Package安装检查:


# rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make pdksh sysstat unixODBC unixODBC-devel | grep “not installed”


——————————————————————————————


package compat-libstdc++-33 is not installed


package elfutils-libelf is not installed


package elfutils-libelf-devel is not installed


package glibc-common is not installed


package glibc-headers is not installed


package pdksh is not installed


package unixODBC is not installed


package unixODBC-devel is not installed


虽然这么多包没有,安装中并未报错


4、增加数据库组和用户:(Oracle用户,dba组,oinstall组)


# id oracle (确认oracle用户是否存在)


# groupadd oinstall (建立产品清单管理组)


# groupadd dba (建立数据库安装组)


#groupadd asmadmin (建立ASM管理组)


#groupadd asmdba (建立Grid管理组)


# useradd -g oinstall -G dba,asmdba oracle -d /data/oracle (oinstall为主要组,确保/data/home/oracle原不存在)


# passwd oracle(这个不要忘记,否则后续登录麻烦)


5、调整OS内核参数:(这个是按照Oracle的文档进行调整的)


create or edit the /etc/sysctl.conf


fs.file-max = 512 *PROCESSES


kernel.shmall = 2097152


kernel.shmmax = 2147483648


kernel.shmmni = 4096


kernel.sem = 250 320000 100 128


net.ipv4.ip_local_port_range = 1024 65000


net.core.rmem_default = 262144


net.core.rmem_max = 4194304


net.core.wmem_default = 262144


net.core.wmem_max = 262144


6、修改/etc/security/limits.conf、/etc/pam.d/login、/etc/profile(在修改它的时候注意shell的格式)


1. Add the following lines in the /etc/security/limits.conf file:


oracle soft nproc 2047


oracle hard nproc 16384


oracle soft nofile 1024


oracle hard nofile 65536


2. Add the following line to the /etc/pam.d/login file, if it does not already


exist:


session required /lib/security/pam_limits.so


session required pam_limits.so


3. Depending on the oracle user's default shell, make the following changes


to the default shell startup file:


For the Bourne, Bash, or Korn shell, add the following lines in the


/etc/profile file (or the /etc/profile.local file on SUSE LinuxEnterprise Server systems):


if [ $USER = “oracle” ]; then


if [ $SHELL = “/bin/ksh” ]; then


ulimit -p 16384


ulimit -n 65536


else


ulimit -u 16384 -n 65536


fi


fi


(这里可以不用写)


7、建立必需目录:


# more /etc/oratab (确认原来是否存在Oracle主目录)


# more /etc/oraInst.loc (确认原来是否存在Oracle产品清单目录)


# chown -R oracle:oinstall /data/home/oracle


8、设置Oracle用户环境变量:


如果服务器有多网卡, 注意设置ORACLE_HOSTNAME为某网卡IP对应的主机名, 参照/etc/hosts文件。


# su - oracle


$ vi ~/.bash_profile和 .profile


umask 022


export ORACLE_BASE=/data/home/oracle


export ORACLE_HOME=$ORACLE_BASE/11g


export ORACLE_SID=oratest


export PATH=.:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH


export LC_ALL=“en_US”


export LANG=“en_US”


export NLS_LANG=“AMERICAN_AMERICA.ZHS16GBK”


export NLS_DATE_FORMAT=“YYYY-MM-DD HH24:MI:SS”


9、解压缩Oracle文件:


$ cd /data/home/oracle/11g


$ unzip linux.x64_11gR1_database_1013.zip (解压到/data/oracle/ db目录下,可选目录)


在解压后oracle软件的response目录里有各种响应文件的模版。


$ cd /data/home/oracle/database/response


10、修改响应文件enterprise.rsp


#以下参数根据实际情况更改


UNIX_GROUP_NAME= “oinstall”(一般不用修改)#—-oracle用户用于安装软件的组名


oracle.install.db.InstallEdition=EE(一般不用修改)#—安装版本类型,一般是企业版


oracle.install.db.isCustomInstall=true(一般不用修改)#—是否定制安装,默认Partitioning,OLAP,RAT都选上了


oracle.install.db.DBA_GROUP=dba(这个和oracle用户权限相对应)


oracle.install.db.OPER_GROUP=oinstall(这个和oracle用户权限相对应)


FROM_LOCATION=“/stage/products.xml”   #—–oracle产品清单目录


ORACLE_BASE=“/data/home/oracle”


ORACLE_HOME= “/data/home/oracle/11g”


SELECTED_LANGUAGES=en,zh_CN,zh_TW  #—-oracle运行语言环境,一般包括引文和简繁体中文

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值