下载与安装CentOS7
CentOS7下载地址:https://mirrors.cnnic.cn/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso,也就是文件:《CentOS-7-x86_64-DVD-2009.iso》
VMware版本:16.2.4 build-20089737
创建虚拟机,配置如下:
![](https://i-blog.csdnimg.cn/blog_migrate/dbbd441b49ff6aec482b5132ae6b20ff.png)
安装CentOS7时,一切都采用默认安装。
配置CentOS7
安装一些依赖包
yum install -y compat-libcap1 compat-libstdc++-33 gcc-c++ ksh libaio-devel libstdc+±devel elfutils-libelf-devel fontconfig-devel libXrender-devel libXtst
yum install -y telnet.*
关闭selinux
vi /etc/selinux/config,将selinux设置为disabled
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 these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
配置系统变量
vi /etc/sysctl.conf ,新增配置如下:
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
然后执行sysctl -p
新增用户oracle
新增用户oracle
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
passwd oracle
新建目录与设置权限
mkdir -p /opt/app/oracle/dbhome
mkdir -p /opt/software
chown -R oracle:oinstall /opt
设置环境变量
export ORACLE_SID=oratest
export ORACLE_BASE=/opt/app/oracle
#export ORACLE_HOME=$ORACLE_BASE/dbhome
export ORACLE_HOME=/opt/software
export PATH=$PATH:$ORACLE_HOME/bin
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
安装Oracle19C
上传oracle-19c到centos7上,
在虚拟机的terminal上执行安装;一路选择默认安装,直到结束
![](https://i-blog.csdnimg.cn/blog_migrate/51d3699af84728ab4a2d2f2ccf000b26.png)
启动Oracle19C
启动数据库
sqlplus / as sysdba
SQL> startup
SQL> alter pluggable database ORCLPDB open;
SQL> alter session set container=ORCLPDB;
启动监听器
lsnrctl start
lsnrctl status
等待10秒钟左右,执行这个命令,如果能正确执行,说明oracle19c启动成功
sqlplus demo/demo@localhost:1521/orclpdb