当前位置:首页 > 数据库 > RHEL7.4 安装Oracle11gR2单机版

RHEL7.4 安装Oracle11gR2单机版

数据库5年前 (2018-11-25)

RHEL7.4 安装Oracle11gR2单机版


系统环境配置

vi /etc/sysconfig/network
添加
NETWORKING=yes
HOSTNAME=laos-billincdr-svr1
=================================================================
mv /etc/hosts /etc/hosts.bak
vi /etc/hosts
添加
127.0.0.1   laos-billincdr-svr1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
=================================================================
yum -y install binutils binutils-devel compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel elfutils-libelf elfutils-libelf-devel-static gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 glibc glibc-common glibc-headers ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686 libXp lrzsz numactl-devel setuptool ntsysv openssh-clients smartmontools libgomp kernel-headers libXtst libXtst.i686 libXext libXp libXext.i686 libXp-devel libXpm-devel tightvnc-server xorg-x11-apps

yum -y group install "Server with GUI"

rpm -ivh compat-libstdc++-33-3.2.3-72.el7.i686.rpm
rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
rpm -ivh --nodeps elfutils-libelf-devel-static-0.170-4.el7.x86_64.rpm  elfutils-libelf-devel-static-0.170-4.el7.i686.rpm
=================================================================
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  32768

vi /etc/pam.d/login
添加
session required /lib64/security/pam_limits.so

vi /etc/sysctl.conf
添加 
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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


数据库环境配置

groupadd oinstall    
groupadd dba          
useradd -g oinstall -G dba oracle  
passwd oracle

mkdir -p /u01/oracle
mkdir -p /u01/oracle/11.2.0/db_1
mkdir -p /u01/oraInventory 
mkdir /u01/oracle/oracle-software

chown -R oracle:oinstall /u01/oracle/
chown -R oracle:oinstall /u01/oracle/11.2.0/db_1/
chown -R oracle:oinstall /u01/oraInventory/
chmod -R 755 /u01/oracle/
chmod -R 755 /u01/oracle/11.2.0/db_1/
chmod -R 775 /u01/oraInventory/
chown oracle.oinstall /u01/oracle/oracle-software
==================================================================
vi /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 022
fi
=================================================================
su - oracle
vi .bash_profile
添加
export ORACLE_SID=oral1;
export ORACLE_BASE=/u01/oracle;
export ORACLE_HOME=/u01/oracle/11.2.0/db_1;
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
执行
source /home/oracle/.bash_profile
==================================================================
vncserver
export DISPLAY=:1.0
xhost +

mv /root/p13390677_112040_Linux-x86-64_1of7.zip /u01/oracle/oracle-software
mv /root/p13390677_112040_Linux-x86-64_2of7.zip /u01/oracle/oracle-software

cd /u01/oracle/oracle-software
chown oracle.oinstall p13390677_112040_Linux-x86-64_1of7.zip
chown oracle.oinstall p13390677_112040_Linux-x86-64_2of7.zip

su - oracle
export DISPLAY=:1.0
xhost +

cd /u01/oracle/oracle-software
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
sed -i 's/CV_ASSUME_DISTID=OEL4/CV_ASSUME_DISTID=OEL6/' /u01/oracle/oracle-software/database/stage/cvu/cv/admin/cvu_config
cd /u01/oracle/oracle-software/database
./runInstaller -jreLoc /usr/lib/jvm/jre-1.8.0


排错

1.创建数据时报ORA-27123:unable to attach to shared memory segment
重新修改/etc/sysctl.conf中参数,然后sysctl –p生效

2.sqlplus进入startup时报ORA-01078: failure in processing system parameters
cp /u01/oracle/admin/CDRTEST/pfile/init.ora.1025201817216 /u01/oracle/11.2.0/db_1/dbs/initoral1.ora


本站所有文章均可随意转载,转载时请保留原文链接及作者。

本文链接:https://www.vos.cn/db/247.html

相关文章

CentOS7 Postfix配置

CentOS7 Postfix配置

使用Postfix+Dovecot配置简单的邮件服务器安装Bindyum install bind-chroot配置Bind  编辑主配置文件,里面的各种参数用...

CentOS6 安装Oracle11gR2

CentOS6 安装Oracle11gR2

使用oracle-rdbms-server-11gR2-preinstall工具,自动安装oracle所需的RPM包,自动创建oracle用户和dba、oinstall组,自动配置/etc/sysct...

Redhat 6.5网卡聚合绑定

Redhat 6.5网卡聚合绑定

linux下网卡bonding配置是通过多张网卡绑定为一个逻辑网卡,实现本地网卡的冗余,带宽扩容和负载均衡,在生产场景中是一种常用的技术,常用聚合模式为0,1,60(balance-rr)轮循(RR)...

CentOS 7转换为OEL 7

CentOS 7转换为OEL 7

参考官方提供的脚本,支持将CentOS 5, 6, 7转换为使用UEK(Unbreakable Enterprise Kernel)的Oracle Enterprise Linux转换系统curl&n...

EVE-NG配置静态固定地址

EVE-NG配置静态固定地址

sudo vi /etc/network/interfaces# The primary network interfaceiface eth0 inet manual ...

Centos 7切换阿里源并安装EPEL/IUS/REMI仓库

Centos 7切换阿里源并安装EPEL/IUS/REMI仓库

切换国内源cd /etc/yum.repo.d/mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-...