Skip to content

Latest commit

 

History

History
146 lines (129 loc) · 3.83 KB

oracle-silent-install.md

File metadata and controls

146 lines (129 loc) · 3.83 KB

ORACLE 静默安装

准备工作

安装依赖包

yum install -y binutils compat-libstdc++-33 compat-db \
control-center elfutils-libelf elfutils-libelf-devel gcc \
gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio \
libaio-devel expat libgcc libstdc++ libstdc++-devel make \
sysstat unixODBC glibc-headers unixODBC-devel pdksh \
sysstat xscreensaver  

组用户创建

# groupadd oinstall
# groupadd -g 1002 dba
# groupadd -g 1005 oper
# useradd -u 1002 -g oinstall -G oper,dba oracle
# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
##查看用户oracle组情况
# id oracle
uid=1002(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1005(oper)

os参数修改

修改安装限制

# vim /etc/security/limits.conf
## 添加如下
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

# vim /etc/pam.d/login
## 添加如下
session required pam_limits.so

修改内核参数

# vim /etc/sysctl.conf
## 添加如下:
kernel.shmmax = 2077155328  
kernel.sem = 250 32000 100 128
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

## 执行 使内核参数生效
# sysctl -p

修改profile

# vim /etc/profile
## 添加如下:
if [ $USER = "oracle" ] ; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 0
fi

修改.bash_profile

# su - oracle
# vim .bash_profile
## 添加如下
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib 
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$HOME/.local/bin:
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK    

## 执行使之生效
# source .bash_profile 

安装

下载安装包

linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip 变更文件权限 chown oracle:oinstall linux.x64_11gR2_database_*

修改inventory目录

vim /etc/oraInst.loc inventory_loc=/mnt/app/oraInventory inst_group=oinstall

开始安装

su - oracle
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

./runInstaller -silent -force -noconfig -IgnoreSysPreReqs \
oracle.install.responseFileVersion=/mnt/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 \
oracle.install.option=INSTALL_DB_SWONLY \
DECLINE_SECURITY_UPDATES=true \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/mnt/app/oraInventory \
SELECTED_LANGUAGES=en,zh_CN,zh_TW \
ORACLE_HOME=/mnt/app/oracle/product/11.2.0/dbhome \
ORACLE_BASE=/mnt/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=oper

GDBNAME=ora11g SID=orcl