oracle 18c单实例安装文档

内存要求

Database:最少1G,推荐大小8G。

Grid:最少8G。--要求更高了

配置操作系统参数

任选其一操作即可

通过Oracle的RPM包来配置操作系统

如果你的操作系统是Oracle Linux或者RedHat Linux,那么你可以通过Oracle RPM包来完成绝大部分的操作系统的配置。Oracle Linux5.2及以上版本有该RPM包。

RPM包干的事情:

  • Automatically downloads and installs any additional RPM packages needed for installing Oracle Grid Infrastructure and Oracle Database, and resolves any dependencies
  • Creates an oracle user, and creates the oraInventory (oinstall) and OSDBA (dba) groups for that user
  • As needed, sets sysctl.conf settings, system startup parameters, and driver parameters to values based on recommendations from the Oracle RDBMS Pre-Install program
  • Sets hard and soft resource limits
  • Sets other recommended parameters, depending on your kernel version

# yum install oracle-database-server-18c-preinstall

手动配置

配置/etc/hosts

[root@18c software]# cat /etc/hosts

127.0.0.1 localhost localhost.localdomain

192.168.1.178 18c

添加用户和组

/usr/sbin/groupadd -g 54321 oinstall

/usr/sbin/groupadd -g 54322 dba

/usr/sbin/groupadd -g 54323 oper

/usr/sbin/useradd -u 54321 -g oinstall -G dba,oper oracle

关闭防火墙/SELINUX

--关闭防火墙

[root@18c software]# systemctl stop firewalld

[root@18c software]# systemctl disable firewalld

Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

--关闭SELINUX(需重启)

[root@18c software]# vi /etc/selinux/config

[root@18c software]# cat /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

临时:

[root@18c software]# setenforce 0

[root@18c software]# getenforce

Permissive

创建目录

mkdir -p /u01/app/oracle/product/18.1.0/dbhome_1

chown -R oracle:oinstall /u01

chmod -R 775 /u01/

配置ORACLE用户环境变量

ORACLE_SID=lei;export ORACLE_SID

ORACLE_UNQNAME=zqlei;export ORACLE_UNQNAME

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/18.1.0/dbhome_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT

NLS_LANG=american_america.ZHS16GBK; export NLS_LANG

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

配置资源限制

--limit

[root@18c ~]# vim /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

oracle soft memlock 3145728

oracle hard memlock 3145728

--sysctl

[root@rac1 ~]# vim /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

安装必要的包

yum install binutils gcc gcc-c++ compat-libstdc++-33 glibc glibc.i686 glibc-devel ksh libgcc.i686 libstdc++-devel libaio libaio.i686 libaio-devel libaio-devel.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat compat-libcap1 –y

compat-libstdc++-33这个包镜像里可能没有,需要单独下载

http://www.rpmfind.net/linux/centos/7.5.1804/os/x86_64/Packages/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm

安装

和12c一样,直接解压到ORACLE_HOME下,然后运行runinstaller安装即可

解压

[oracle@18c software]$ unzip -d /u01/app/oracle/product/18.1.0/dbhome_1/ OracleDatabase18.0.0.0.0LinuxX86_64.zip

运行Runinstaller

[oracle@18c dbhome_1]$ ./runInstaller

略…

DBCA建库

和12c没有区别

结束安装..

更多信息,请查看官方文档:

https://docs.oracle.com/en/database/oracle/oracle-database/18/ladbi/changes-in-this-release-for-oracle-database.html#GUID-4028441F-55CE-4B42-BB8A-2294BABC131B

举报
评论 0