实验环境:centos 7.6(19c在linux上最低运行版本为7.4以上)   Oracle 19c 19.3.0

ip:192.168.0.100   hostname:cmdb     

1、配置yum、修改时间

mount  /dev/sr0 /mnt
cd /etc/yum.repos.d/
rm -rf *

vi /etc/yum.repos.d/ol.repo   
[local-source]
name=ol
baseurl=file:///mnt/
ebabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

yum install bc gcc gcc-c++ binutils compat-libcap1 compat-libstdc++ dtrace-modules dtrace-modules-headers 
dtrace-modules-provider-headers dtrace-utils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel 
ksh libaio libaio-devel libdtrace-ctf-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc librdmacm-devel 
libstdc++ libstdc++-devel libxcb make smartmontools sysstat 

date
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

2、创建用户、组、目录

/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

mkdir -p /u01/app/oracle/product/19.3.0/db_1
chown -R oracle:oinstall /u01/
chmod -R 775 /u01/

passwd oracle

3、配置系统参数

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
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
sysctl --system

vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft nproc 16384
oracle hard nproc 16384
root soft nproc 2047

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

vi /etc/profile添加:
if [ $USER = "oracle" ] || [ $USER = "grid" ] ; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384
       ulimit -n 65536
    else
       ulimit -u 16384 -n 65536
    fi
fi

4、关闭防火墙和selinux、ntp

防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service

selinux
vi /etc/selinux/config
SELINUX=disabled

关闭NTP:
systemctl stop ntpd.service
systemctl disable ntpd.service

5、oracle用户环境变量

vi .bash_profile
在,编辑模式下输入
export TMP=/tmp 
export TMPDIR=$TMP 
export ORACLE_SID=cmdb
export ORACLE_BASE=/u01/app/oracle 
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
export TNS_ADMIN=$ORACLE_HOME/network/admin 
export PATH=/usr/sbin:$PATH 
export PATH=$ORACLE_HOME/bin:$PATH 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib 
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 
umask 022
export NLS_LANG=AMERICAN_AMERICA.UTF8
source .bash_profile

6.上穿安装包并解压

yum -y install zip unzip
su - oracle
unzip LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.3.0/db_1/

7、Missing or Ignored package compat-libstdc++-33-3.2.3 causes Text Issues (文档 ID 2254198.1)

linux7缺少该包,需要去网上下载手动安装,或者不安装不会影响数据库的使用,详情看mos文档2254198.1

8、图形化安装

export DISPLAY=192.168.0.1:0.0
LANG=en_US ./runInstaller

图形化界面如下:
file
file
file
file
file
file
file
file
file
file
file
file

9、DBCA

dbac图形如下:
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file

/u01/app/oracle/product/19.3.0/db_1/assistants/dbca/templates 模板数据库
/u01/app/oracle/admin/cmdb/scripts 数据库创建脚本位置
/u01/app/oracle/cfgtoollogs/dbca/cmdb/trace.log_2020-12-07_03-36-03PM DBCA日志
/u01/app/oracle/diag/rdbms/cmdb/cmdb/trace/alert_cmdb.log 数据库告警日志

10、打开数据库,打开监听

sqlplus / as sysdba
lsnrctl start

Related Posts