oracle12c安装

Posted Knight灬麒

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle12c安装相关的知识,希望对你有一定的参考价值。

安装红帽oracle12c(自动配置)

安装/配置环境

[[email protected] ~]# wget http://yum.oracle.com/public-yum-ol7.repo

[[email protected] ~]# mv public-yum-ol7.repo /etc/yum.repos.d/

[[email protected] ~]# wget http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

[[email protected] yum.repos.d]# yum install oracle-database-server-12cR2-preinstall.x86_64 --nogpgcheck

[[email protected] ~]# vi /etc/sysctl.conf

#加入#

fs.file-max = 6815744

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096

kernel.shmall = 1073741824

kernel.shmmax = 4398046511104

kernel.panic_on_oops = 1

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

net.ipv4.conf.all.rp_filter = 2

net.ipv4.conf.default.rp_filter = 2

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

[[email protected] yum.repos.d]# /sbin/sysctl -p

[[email protected] yum.repos.d]# vi /etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf

#加入#

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft nproc 16384

oracle hard nproc 16384

oracle soft stack 10240

oracle hard stack 32768

oracle hard memlock 134217728

oracle soft memlock 134217728

[[email protected] home]# vi /etc/pam.d/login

#加入#

session required pam_limits.so

[[email protected] ~]# vi /etc/hosts

192.168.214.142 knight01

[[email protected] ~]# vi /etc/selinux/config

#修改#

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

[[email protected] yum.repos.d]# yum -y install binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel pdksh compat-libcap1 libXext* libXtst* libX11* libXau* libxcb* libXi* nscd* libXp* xorg* xterm* unzip* readline* compat*

如果安装Oracle12cR1版本,还需安装

yum install gcc -y

yum install gcc-c++ -y

yum install libXext -y

yum install libXext.i686 -y

yum install zlib-devel -y

yum install zlib-devel.i686 -y

OEL6版本,还需安装

yum install e2fsprogs -y

yum install e2fsprogs-libs -y

yum install libs -y

yum install libxcb.i686 -y

yum install libxcb -y

创建用户/目录

groupadd -g 2000 oinstall

groupadd -g 2300 dba

groupadd -g 2301 oper

useradd -m -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle

passwd oracle

[[email protected] home]# ls -lR /u01

mkdir -p /u01/app/oracle/product/12.2.0.1/db_1

chown -R oracle:oinstall /u01

chmod -R 775 /u01

关闭防火墙

[[email protected] home]# systemctl stop firewalld

[[email protected] home]# systemctl disable firewalld

设置环境变量

[[email protected] ~]$ vi .bash_profile

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1

export ORACLE_SID=VDEDU

export ORACLE_TERM=xterm

export PATH=/usr/sbin:$PATH

export PATH=/u01/app/ogg:$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=/u01/app/oracle:$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

export LANG=C

export ORACLE_UNQNAME=knight

安装oracle

#传安装包#

[[email protected] /]# unzip linuxx64_12201_database.zip

[[email protected] /]# chown mysql:mysql -R database

#解决X11问题#

[[email protected] yum.repos.d]# export DISPLAY=:0.0

[[email protected] yum.repos.d]# xhost +

[[email protected] ~]$ export DISPLAY=:0.0

[[email protected] ~]$ xhost +

[[email protected] database]# ./runInstaller

netca #注销在oracle用户下#

dbca

export DISPALY=:0.0

 











以上是关于oracle12c安装的主要内容,如果未能解决你的问题,请参考以下文章

oracle——Oracle12c安装详解

下载安装oracle旧版本oracle 12c的详细步骤

oracle12c安装

基于CentOS7安装部署 Oracle 12c

基于CentOS7安装部署 Oracle 12c ?

linux中安装oracle12c透明网关