[root@localhost ~]# vim /etc/hosts
[root@localhost ~]# 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
[root@localhost ~]# /sbin/sysctl -p
[root@localhost ~]# vi /etc/security/limits.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
yum install -y bc
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y dtrace-modules
yum install -y dtrace-modules-headers
yum install -y dtrace-modules-provider-headers
yum install -y dtrace-utils
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y fontconfig-devel
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libdtrace-ctf-devel
yum install -y libXrender
yum install -y libXrender-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y librdmacm-devel
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libxcb
yum install -y make
yum install -y net-tools # Clusterware
yum install -y nfs-utils # ACFS
yum install -y python # ACFS
yum install -y python-configshell # ACFS
yum install -y python-rtslib # ACFS
yum install -y python-six # ACFS
yum install -y targetcli # ACFS
yum install -y smartmontools
yum install -y sysstat
# Added by me.
yum install -y unixODBC
[root@localhost ~]# groupadd -g 54321 oinstall
[root@localhost ~]# groupadd -g 54322 dba
[root@localhost ~]# groupadd -g 54323 oper
[root@localhost ~]# useradd -u 54321 -g oinstall -G dba,oper oracle
echo "oracle" | passwd --stdin oracle
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
chown -R oracle:oinstall /u01 (-r子集目录全赋予)
chmod -R 775 /u01
(这里如果创建组和用户出错)
得先删除用户后删除组
userdel -r oracle
userdel -r grid
groupdel dba
groupdel oinstall
[root@localhost ~]# vim /etc/selinux/config
修改selinux参数
SELINUX=disabled
关闭和禁用防火墙
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
[root@localhost ~]# vi /home/oracle/.bash_profile
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export ORACLE_SID=orcl
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
创建/opt/software
[root@localhost ~]# mkdir /opt/software
[root@localhost ~]# cd /opt/software/
[root@localhost software]# mv /vagrant/LINUX.X64_193000_db_home.zip ./ (路径根据自己相应的变化)
[oracle@dump-oracle ~]$ cd $ORACLE_HOME
[oracle@dump-oracle dbhome_1]$ ll
total 0
[oracle@dump-oracle dbhome_1]$ unzip /opt/software/LINUX.X64_193000_db_home.zip
cd $ORACLE_HOME
./runInstaller
如果图形化起不来用xstart直接登录oracle用户执行runInstaller
一定要以root用户执行
cd $ORACLE_HOME
mv OPatch/ OPatch_old
unzip /opt/software/p6880880_121010_Linux-x86-64.zip
unzip p30869156_190000_Linux-x86-64
在30869156文件夹中执行
[oracle@localhost ~]$ cd $ORACLE_HOME
[oracle@localhost dbhome_1]$ cd 31281355/
[oracle@localhost 31281355]$ /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/opatch apply
yum install -y psmisc (-y 默认yes)
如果虚拟机图形化界面起不来老样子用xhost
这边需要把路径改到 bin/netca 原理一样
直接输入dbca图形化会自动起来
实在图形化出不来用xhost(看上文)
如果安装报错可以监听没起来
启动监听:lsnrctl start
口令设置看个人