Proxmox VE 6 deployment Oracle 19C (Single Instance)

The basic conditions for preparation

  • Ready virtual machine, the basic configuration: 16G memory, 4core cpu, 4 disk (a disk system, a / tmp partition, a data partition, a swap partition swap).

 

  • Prepare the operating system and make the disk available.

 

Recommend formal environment provides separate disk or partition for user data storage.

[root@100 home]# unzip LINUX.X64_193000_db_home.zip  -d /home/oracle19c
 

[root@centos100 home]# unzip LINUX.X64_193000_db_home.zip  -d /home/oracle19c

 

[root@centos100 ~]# more preinstall.sh 
#!/bin/bash
#writen by sery(wx:formyz),2019-7-18

#install dependency package
yum install -y \
bc \
binutils \
compat-libcap1 \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
fontconfig-devel \
glibc \
glibc-devel \
kmod \
kmod-libs \
gcc-c++ \
ksh \
libaio \
libaio-devel \
libX11 \
libXau \
libXi \
libXtst \
libXrender \
libXrender-devel \
libgcc \
librdmacm-devel \
libstdc++ \
libstdc++-devel \
libxcb \
make \
net-tools \
nfs-utils \
 \
python-configshell \
python-rtslib \
python-six \
targetcli \
smartmontools \
sysstat \
tigervnc-server

#install xwindow
yum groupinstall –y "X Window System"
yum groupinstall -y "GNOME Desktop" "Graphical Administration Tools"

#modify system parameter
cat << EOF > /etc/sysctl.d/98-oracle-kernel.conf
vm.swappiness = 1
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 8589934590 
kernel.shmall = 2147483648
kernel.shmmni = 4096
EOF
sysctl -p /etc/sysctl.d/98-oracle-kernel.conf

cat << EOF > /etc/security/limits.d/99-oracle-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
EOF

#create groups and user
groupadd -g 1000 oinstall
groupadd -g 1001 dba
useradd -g oinstall -G dba oracle
echo "sery888"|passwd --stdin oracle

#create directory
mkdir -p /u01/app/oracle/product/19.3/db_01
chown -R oracle.oinstall /u01
chmod -R 755 /u01
 

[root@centos100 ~]# more preinstall.sh 

#!/bin/bash

#writen by sery(wx:formyz),2019-7-18

#install dependency package

yum install -y \

bc \

binutils \

compat-libcap1 \

compat-libstdc++-33 \

elfutils-libelf \

elfutils-libelf-devel \

fontconfig-devel \

glibc \

glibc-devel \

kmod \

kmod-libs \

gcc-c++ \

ksh \

libaio \

libaio-devel \

libX11 \

libXau \

libXt \

libXtst \

libXrender \

libXrender-devel \

libgcc \

librdmacm-devel \

libstdc++ \

libstdc++-devel \

libxcb \

make \

net-tools \

nfs-utils \

python \

python-configshell \

python-rtslib \

python-six \

targetcli \

smartmontools \

sysstat \

tigervnc-server

#install xwindow

yum groupinstall –y "X Window System"

yum groupinstall  -y "GNOME Desktop" "Graphical Administration Tools"

#modify system parameter

cat << EOF > /etc/sysctl.d/98-oracle-kernel.conf

vm.swappiness = 1

vm.dirty_background_ratio = 3

vm.dirty_ratio = 80

vm.dirty_expire_centisecs = 500

vm.dirty_writeback_centisecs = 100

kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576

fs.file-max = 6815744

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

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 8589934590 

kernel.shmall = 2147483648

kernel.shmmni = 4096

EOF

sysctl -p /etc/sysctl.d/98-oracle-kernel.conf

cat << EOF > /etc/security/limits.d/99-oracle-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

EOF

#create groups and user

groupadd -g 1000 oinstall

groupadd -g 1001 dba

useradd -g oinstall -G dba oracle

echo "sery888"|passwd --stdin oracle

#create directory

mkdir -p /u01/app/oracle/product/19.3/db_01

chown -R oracle.oinstall /u01

chmod -R 755 /u01

After this script executed, and then the oracle account set environment variables. Switch to the user oracle, then edit the file /home/oracle/.bash_profile. Increase which reads:

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3/db_01
export PATH=$ORACLE_HOME/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
export ORACLE_SID=serydb
 

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/19.3/db_01

export PATH=$ORACLE_HOME/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

export ORACLE_SID=serydb

Perform source .bash_profile take effect.

If it is an isolated environment, can not connect to the Internet to install it, the operating system needs to mount the iso image file, manually create yum source.

  • Vncserver start the service, you need to set initial startup password. If the root boot, the system can be set to match the root account password. When a client connects, if a blue screen appears (with the windows blue screen is quite different, not only is it an icon on the desktop), you need to check whether the installation of a complete desktop environment, and in particular the gnome graphical management tool.

When the connection from the windows  vnc vnc Viewer client, and the need to specify the address with digital ip colon, this figure vncserver at startup, there will be an output, do not assume the Internet or copied from a lost pass down indiscriminate.

 

Start number is 1, then the time of connection, but also with consistent.

 

Enter the password, if correct, the remote graphical interface appears, if you forget the password or password is incorrect, re-usable vncpass set.

 

Remote graphical installation

 

First, give permission for the installation directory

Oracle installation, use an ordinary account oracle, in order to avoid permissions issues affecting the installation, you need to extract out of catalog given execute permissions, the specific operation is to change the directory owner (group) and give read and write permissions.

-bash-4.2# chown -R oracle:oinstall /home/oracle19c/
-bash-4.2# chmod -R 755 /home/oracle19c/
-bash-4.2# mv /home/oracle19c/*  /u01/app/oracle/product/19.3/db_01
 

-bash-4.2# chown -R oracle:oinstall /home/oracle19c/

-bash-4.2# chmod -R 755 /home/oracle19c/

-bash-4.2# mv /home/oracle19c/*  /u01/app/oracle/product/19.3/db_01

As far as possible to copy the unpacked directory under ORACLE_HOME to set a good, because during the installation process, you can only specify ORACLE_BASE. At this point, I came to understand why the archive name is "LINUX.X64_193000_db_home".

Second, set the variable DISPLAY

In order to describe more clearly ready, I described two steps.

(A) vnc client login to the system, the right to call up the terminal, then the root account xhost + to execute instructions.

 

(Ii) to open a terminal switch to the oracle account execution instruction "export DISPLAY =: 1", this number 1 from the output of vncserver startup, not as the Internet people's articles disorder copying a pass, or executed next installation does not down.

 

Third, start the installation

(A) run the installation script

Go to the directory where the oracle installation script, execute "sh runInstaller".

 

If all goes well, the installation interface will pop up, as shown below:

 

(Ii) during installation is provided.

1, choose to install only the software (After installing the software, and later listeners normal, and then create a database).

 

2, select a single instance (the time to go in oracle rac).

 

3, choose Enterprise Edition (I did not choose the standard version in the past had come).

 

4. Select the oracle base directory, the default directory may differ I started planning directory, correct it.

 

5 selected list of directories.

 

6, is a group selected. A single instance of the default on the line.

 

7, Root scripts to automate the configuration, it can be selected, and enter the system root password. The benefit of this is not like the previous version, the implementation process, the need to switch to a single terminal, execute two scripts to the root account. This simplified, it can improve efficiency.

 

8, a necessary condition for inspection, including memory, dependencies, so a lot of parameters and the like kernel. See a lot of documents, pass skipped over. It is recommended that more patience in order to meet all the conditions for the wonderful!

 

9. The ninth step is the summary information, you can probably find out.

 

After confirming that there is no need to modify the item and click the button "Install" to the next step.

10, perform file copy, links and other operations. This process takes a long time, you can temporarily take a break.

 

In the progress bar to about 63% of the time, a confirmation pop-up confirmation interface, by reading the above text, you can know how the same thing, yes direct elections on the bin (front mentioned).

 

11, the software installation is complete, 

 

Configure the network listener

The terminal continues executing instructions netca, if not bombs graphical interface, the need to set DISPLAY.

 

The next point of several "Next", the last step to complete the point.

 

Creating a good listener, automatically up through the command lsnrctl status to understand their operating states:

[oracle@centos100 db_01]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-JUL-2019 04:31:03

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=centos100)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                19-JUL-2019 04:22:25
Uptime                    0 days 0 hr. 8 min. 45 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3/db_01/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/centos100/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos100)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
 

Create a database

 

1, the terminal execution instruction DBCA any path, the pop-up configuration Assistant window.

 

2 Select a typical configuration, the container is not selected database (temporarily familiar).

 

3, the configuration summary. Pull the scroll bar, look about what settings.

 

4, after confirming nothing wrong, point "Finish" button. Next, be patient.

 

5, progress to around 40% of the time, detailed button "detail" shows oracle instance has started.

 

Login authentication, to see if the instance has been normal.

[oracle@centos100 db_01]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 19 04:51:19 2019
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select count(*) from v$session;

  COUNT(*)
----------
        49
 

[oracle@centos100 db_01]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 19 04:51:19 2019

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

SQL> select count(*) from v$session;

  COUNT(*)

----------

        49

Production follow-up

If it is used in the production environment, then we have created a database in the future, but also multi-system table space, temporary table space, redo log groups, password expiration time, and so to adjust.

Guess you like

Origin www.linuxidc.com/Linux/2019-07/159468.htm