Centos7 安装Oracle11g 11.2.0.4 ——静默安装
一、准备工作
1、下载CentOS7 自行安装(64位)网络自行配置;
2、下载Oracle安装包(转):
oracle 11.02.0.4 安装介质
linux: https://pan.baidu.com/s/1kGsVfAoMJ_bmAJdhQgs6FA 提取码:ptn4
windows: https://pan.baidu.com/s/10wtQrYpyrhZ2dUyAEgdbFQ提取码:frbe
参考:https://blog.csdn.net/demonson/article/details/79753766
3、HostName修改:hostnamectl set-hostname oracle
4、配置hostname(本机IP映射)
vi /etc/hosts
192.168.30.11 oracle
# 测试hostname
ping -c 3 oracle
二、优化配置
1、切换国内yum源:
cd /etc
mv yum.repos.d yum.repos.d.bak
mkdir yum.repos.d
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
2、安装依赖包:
yum -y install 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
3、检查依赖是否安装完整:
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"
4、优化OS内核参数
vim /etc/sysctl.conf #编辑,在最后添加以下代码
fs.aio-max-nr = 1048576
fs.file-max = 6815744
# shmall、shmmax参数要根据实际内存数进行调整,不然安装会有问题,静态安装很容易忽略
# 图形化安装在检测是将会提示
# 官网建议:
kernel.shmall = 8388608
# 官网建议:以字节为单位的物理内存(RAM)大小的一半,例如物理内存为32G
kernel.shmmax = 17179869184
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 = 1048586
#修改完后执行使参数生效。
sysctl -p
5、增加用户和组
groupadd oinstall
groupadd dba
groupadd asmadmin
groupadd asmdba
useradd -g oinstall -G dba,asmdba oracle -d /home/oracle
# 添加完成后
id oracle # 查看oracle用户
passwd oracle # 初始化oracle用户的密码
6、修改limits.conf限制
vi /etc/security/limits.conf #在末尾添加以下代码
#在末尾添加
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required pam_limits.so
vi /etc/profile
if [ $USER = "oracle" ]; then
if [