Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Setting up Oracle Database 19c and Grid requires thorough preparation of the environment, including essential configurations for hosts, security, disk setup, and user access. Here’s a comprehensive guide that walks you through each step, ensuring a smooth installation on a Linux environment.
The /etc/hosts
file is essential for name resolution in network configurations. Add the following to link your IP address with the hostname for easy referencing:
# Open /etc/hosts and add <IP-address> hostname:
10.0.1.211 higorara
This setup ensures that the hostname higorara
can be referenced by its IP, 10.0.1.211, within the system.
Linux’s SELinux and firewall configurations may interfere with Oracle installations. Here’s how to adjust these settings:
/etc/selinux/config
to change SELinux from enforcing
to permissive
. setenforce Permissive # apply the change
getenforce # verify the current status
# OR
vi /etc/selinux/config # change SELINUX=enforcing to SELINUX=permissive
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld # check that the firewall is inactive
To install Oracle binaries and set up ASM, ensure that disk partitions and directories are correctly configured.
/u01
is mounted according to this guide, create directories for Oracle and Grid installations: mkdir -p /u01/app/oracle/product/19.0.0/db_1
mkdir -p /u01/app/grid/product/19.0.0/grid
mkdir -p /u01/app/grid/grid_base
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid/
chmod -R 775 /u01
Install the necessary packages to ensure compatibility with Oracle 19c:
yum install -y oracle-database-preinstall-19c
yum install -y oracleasm oracleasm-support
These packages handle dependencies and kernel settings for Oracle installations, simplifying the setup process.
To manage Oracle ASM and Database installations, configure users and groups for appropriate permissions.
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
useradd -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba grid
passwd grid # set password
usermod -a -G asmadmin,asmdba oracle
passwd oracle # set password
Oracle ASM improves storage management by integrating the disks directly with Oracle’s systems.
oracleasm configure -i
# Provide responses:
# Default user to own the driver interface []: grid
# Default group to own the driver interface []: asmadmin
# Start Oracle ASM library driver on boot (y/n) [n]: y
# Scan for Oracle ASM disks on boot (y/n) [y]: y
oracleasm init
oracleasm status
oracleasm createdisk DATA01 /dev/vg_data/lv_data1
oracleasm createdisk DATA02 /dev/vg_data/lv_data2
oracleasm createdisk DATA03 /dev/vg_data/lv_data3
oracleasm createdisk DATA04 /dev/vg_data/lv_data4
oracleasm listdisks
ls -l /dev/oracleasm/disks
oracleasm scandisks # re-scan for marked disks
oracleasm querydisk -d ASMDISK10 # verify specific disk details
bash oracleasm deletedisk ASMDISK10
To install Oracle Database 19c and Grid Infrastructure, it’s essential to use the correct user accounts for each component. Use the grid
user for the Grid Infrastructure installation and the oracle
user for the database binaries. Follow the steps below for successful setup and patching.
Start by downloading Oracle Database 19c and Oracle Grid Infrastructure from Oracle’s official site.
.zip
files onto your server. To streamline this, create a script named wget.sh
that contains all download URLs, making it executable and running it as follows: chmod +x wget.sh
./wget.sh
/tmp
directory for the downloads.It’s important to execute the following steps using the appropriate user account:
grid
user to install Grid Infrastructure.oracle
user for Oracle Database binaries.With the grid
user, extract the Grid binary:
su - grid
unzip -q V982068-01.zip -d /u01/app/grid/product/19.0.0/grid
Create a directory specifically for the Grid patch, then extract the patch into this directory:
mkdir -p /u01/patch_grid
unzip /tmp/p34774469_190000_Linux-x86-64.zip -d /u01/patch_grid
Backup the current OPatch directory and extract the updated version for Grid Infrastructure:
mv /u01/app/grid/product/19.0.0/grid/OPatch /u01/app/grid/product/19.0.0/grid/OPatch.bkp
unzip -q /tmp/p6880880_190000_Linux-x86-64.zip -d /u01/app/grid/product/19.0.0/grid
Navigate to the Grid home directory and start the Grid installer with the patch applied:
./gridSetup -applyRU /u01/patch_grid
Switch to the oracle
user and extract the Oracle Database binary:
su - oracle
unzip -q V982063-01.zip -d /u01/app/oracle/product/19.0.0/db_1
Create a directory for the database patch and extract it:
mkdir -p /u01/patch_oracle
unzip /tmp/p34774469_190000_Linux-x86-64.zip -d /u01/patch_oracle
Again, move the current OPatch directory and extract the updated version for the Oracle Database:
mv /u01/app/oracle/product/19.0.0/db_1/OPatch /u01/app/oracle/product/19.0.0/db_1/OPatch.bkp
unzip -q /tmp/p6880880_190000_Linux-x86-64.zip -d /u01/app/oracle/product/19.0.0/db_1
To properly install Oracle Database 19c and Grid Infrastructure, you’ll need to use the appropriate user accounts for each component. Use the grid
user for Grid Infrastructure and the oracle
user for database binaries. Follow these steps closely to set up and apply patches as outlined.
1. Download Binaries
.zip
files to the server. To automate this, you may create a script called wget.sh
that lists all necessary URLs. Use the following commands: chmod +x wget.sh
./wget.sh
Enter your Oracle login credentials when prompted. Ensure there’s enough space in the /tmp
directory.
2. Start Session with Correct Users
grid
user to handle Grid Infrastructure installation.oracle
user for Oracle Database binary installation. This distinction is essential to set the correct permissions and configuration.3. Extract and Prepare Directories
grid
user, extract the Grid binary: su - grid unzip -q V982068-01.zip -d /u01/app/grid/product/19.0.0/grid
mkdir -p /u01/patch_grid unzip /tmp/p34774469_190000_Linux-x86-64.zip -d /u01/patch_grid
mv /u01/app/grid/product/19.0.0/grid/OPatch /u01/app/grid/product/19.0.0/grid/OPatch.bkp unzip -q /tmp/p6880880_190000_Linux-x86-64.zip -d /u01/app/grid/product/19.0.0/grid
gridSetup
to apply the patch:bash ./gridSetup -applyRU /u01/patch_grid
4. Database Binary Extraction
oracle
user to handle Oracle Database installation: su - oracle
unzip -q V982063-01.zip -d /u01/app/oracle/product/19.0.0/db_1
5. Prepare Patch Directory for Database
mkdir -p /u01/patch_oracle
unzip /tmp/p34774469_190000_Linux-x86-64.zip -d /u01/patch_oracle
6. Apply the Latest OPatch for Database
mv /u01/app/oracle/product/19.0.0/db_1/OPatch /u01/app/oracle/product/19.0.0/db_1/OPatch.bkp
unzip -q /tmp/p6880880_190000_Linux-x86-64.zip -d /u01/app/oracle/product/19.0.0/db_1
7. Run Oracle Installer with Patch Applied
runInstaller
command: ./runInstaller -applyRU /u01/patch_oracle
Following these steps ensures that the binaries are correctly installed with all necessary patches, using the correct user accounts for each component to maintain permissions and security.
Following these detailed steps will set up Oracle Database 19c and Oracle ASM efficiently, ensuring your environment is optimized and ready for production or further development. Proper configuration of security, users, disks, and necessary binaries will streamline Oracle’s performance and stability on your system.