Oracle 12C Graphics & Quietly Installing Trample

Keywords: Oracle Database yum glibc

1 Installation Planning

ORACLE is installed on the new disk. The disk is mounted on u01. d01 and d02 are symbolic connections. The actual directory is under u01.

parameter value
Oracle base /d01/app/oracle
Software location /d01/app/oracle/product/12102/dbhome_1
DATAFILEDESTINATION /d02/oradata
RECOVERYAREADESTINATION /d02/fast_recovery_area
Global database name gorcl12c
SID orcl12c

2 mount disk

fdisk -l # View the data disk on the instance
fdisk -u /dev/vdb # Partition Data Disk
# np1..w
fdisk -lu /dev/vdb # View new partitions
mkfs.ext4 /dev/vdb1

cp /etc/fstab /etc/fstab.bak
echo /dev/vdb1 /mnt ext4 defaults 0 0 >> /etc/fstab
cat /etc/fstab

mkdir /u01
mount /dev/vdb1 /u01
df -h

3 mount SWAP

### ORACLE requires 1/4 of its memory as swap, confirming the existence of swap, swapoff/swapfile if any.
swapon -s
# Confirm hard disk space
df -hal
# Create swap file 1024 * 16 = 16384 = 16GB (a little more than 16384 when actually created)
dd if=/dev/zero of=/swapfile bs=16386 count=1024k
# Format
mkswap /swapfile
chmod 0600 /swapfile
# Activate swap
swapon /swapfile
# Confirm the existence of swap
swapon -s

4 System Environment Configuration

system configuration

# Specify installation directory
export INSPREFIX=/u01

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

cd $INSPREFIX
mkdir d01
mkdir d02
mkdir stage
ln -s $INSPREFIX/d01 /d01
ln -s $INSPREFIX/d02 /d02
ln -s $INSPREFIX/stage /stage

chown -R oracle:oinstall /d01 $INSPREFIX/d01
chown -R oracle:oinstall /d02 $INSPREFIX/d02
chmod -R 775 /d01 $INSPREFIX/d01
chmod -R 775 /d02 $INSPREFIX/d02
chmod g+s /d01 $INSPREFIX/d01
chmod g+s /d02 $INSPREFIX/d02


yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 \
glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 \
libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 \
libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 smartmontools.x86_64 nfs-utils \
unzip

# Set an upper limit for oracle users at / 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 soft stack 32768

# Graphical without configuration, automatic repair
# Examples of automatic configuration of 8C64G
vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 6580789
kernel.shmmax = 33693640704
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
sysctl -p

ORACLE User Environment Variables

su - oracle
vim ~/.bash_profile

ORACLE_BASE=/d01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/12102/dbhome_1
ORACLE_SID=orcl12c
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SIDPATH ORACLE_SID

5 Graphical Interface Configuration

Installing graphical dependencies and desktop systems

$ yum groupinstall "X Window System"

# Confirm the gnome name in available and use it next
$ yum grouplist

# Install gnome
$ yum groupinstall "GNOME Desktop"

#Enter the Graphic Interface
$ startx

Execute xdpyinfo under root to record connection characters

$ xdpyinfo | grep name
name of display:    :0

Execution under root (important), default xwindow does not allow other users to connect

$ xhost +

Execute dpyinfo Under oracle

$ export DISPLAY=:0

xdpyinfo
...
# Normal display
...

This step is completed.

5 Graphical Installation

database/runInstaller

6 Graphical Creation of Database

dbca

7 graphical configuration listener & TNS connection database

Refer to this article configuration
https://segmentfault.com/a/11...

sqlplus sys/oracle@hostname:1521/orcl12c as sysdba
sqlplus sys/oracle@tnsname as sysdba

8 Start the database

select status from v$instance;

startup nomount

alter database mount;

alter database open;

Posted by clairian on Fri, 04 Oct 2019 17:38:11 -0700