open a EM express port 5500 in Oracle Linux
[root@oracle12cdb1 ~]# firewall-cmd --permanent --add-port=5500/tcp
success
[root@oracle12cdb1 ~]# firewall-cmd --reload
success
This blog contains different things for Oracle DBA, APPS DBA and Middleware technologies. All these things should be tested first on test environments before applying in the Prod environments, please follow the standard Change control to apply all the PreProd and Prod changes. Also to make this blog more useful, please give your comments and share your experience. Thanks
orainstRoot.sh and root.sh scripts post CRS install
[root@oracle12cdb1 app]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@oracle12cdb1 app]# /u01/app/grid/12.2.0/grid_home/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/grid/12.2.0/grid_home
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/grid/12.2.0/grid_home/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/oracle12cdb1/crsconfig/roothas_2022-06-19_00-38-46AM.log
2022/06/19 00:38:47 CLSRSC-363: User ignored prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
how to change hostname in Oracle Linux 7.2
[root@localhost ~]# hostname
oracle12cdb1
[root@localhost ~]# hostnamectl
Static hostname: oracle12cdb1
Icon name: computer-vm
Chassis: vm
Machine ID: 8ced32e2f6ce7e4182560e468ff0fb52
Boot ID: 07e076fe742343a68c9c022c10b0911b
Virtualization: kvm
Operating System: Oracle Linux Server 7.2
CPE OS Name: cpe:/o:oracle:linux:7:2:server
Kernel: Linux 3.8.13-98.7.1.el7uek.x86_64
Architecture: x86-64
[root@localhost ~]# hostnamectl set-hostname oracle12cdb1.testlab.com
[root@localhost ~]# hostname
oracle12cdb1.testlab.com
Grid infrastructure installer error error while loading shared libraries: libnsl.so.1
[grid@oracle12cdb1 grid_home]$ sh gridSetup.sh
/u01/app/grid/12.2.0/grid_home/perl/bin/perl: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory
[root@oracle12cdb1 u01]# yum install libnsl.x86_64
Last metadata expiration check: 2:39:16 ago on Fri 17 Jun 2022 05:46:12 PM NZST.
Dependencies resolved.
=====================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================
Installing:
libnsl x86_64 2.28-189.1.0.1.el8 ol8_baseos_latest 103 k
Upgrading:
glibc i686 2.28-189.1.0.1.el8 ol8_baseos_latest 2.0 M
glibc x86_64 2.28-189.1.0.1.el8 ol8_baseos_latest 2.2 M
glibc-common x86_64 2.28-189.1.0.1.el8 ol8_baseos_latest 1.3 M
glibc-devel x86_64 2.28-189.1.0.1.el8 ol8_baseos_latest 80 k
glibc-headers x86_64 2.28-189.1.0.1.el8 ol8_baseos_latest 485 k
glibc-langpack-en x86_64 2.28-189.1.0.1.el8 ol8_baseos_latest 835 k
Transaction Summary
=====================================================================================================================
Install 1 Package
Upgrade 6 Packages
Total download size: 6.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libnsl-2.28-189.1.0.1.el8.x86_64.rpm 257 kB/s | 103 kB 00:00
(2/7): glibc-2.28-189.1.0.1.el8.x86_64.rpm 1.7 MB/s | 2.2 MB 00:01
(3/7): glibc-common-2.28-189.1.0.1.el8.x86_64.rpm 1.4 MB/s | 1.3 MB 00:00
(4/7): glibc-devel-2.28-189.1.0.1.el8.x86_64.rpm 1.9 MB/s | 80 kB 00:00
(5/7): glibc-2.28-189.1.0.1.el8.i686.rpm 1.4 MB/s | 2.0 MB 00:01
(6/7): glibc-langpack-en-2.28-189.1.0.1.el8.x86_64.rpm 2.4 MB/s | 835 kB 00:00
(7/7): glibc-headers-2.28-189.1.0.1.el8.x86_64.rpm 1.2 MB/s | 485 kB 00:00
---------------------------------------------------------------------------------------------------------------------
Total 4.0 MB/s | 6.9 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : glibc-common-2.28-189.1.0.1.el8.x86_64 1/13
Upgrading : glibc-langpack-en-2.28-189.1.0.1.el8.x86_64 2/13
Running scriptlet: glibc-2.28-189.1.0.1.el8.x86_64 3/13
Upgrading : glibc-2.28-189.1.0.1.el8.x86_64 3/13
Running scriptlet: glibc-2.28-189.1.0.1.el8.x86_64 3/13
Running scriptlet: glibc-headers-2.28-189.1.0.1.el8.x86_64 4/13
Upgrading : glibc-headers-2.28-189.1.0.1.el8.x86_64 4/13
Upgrading : glibc-devel-2.28-189.1.0.1.el8.x86_64 5/13
Running scriptlet: glibc-devel-2.28-189.1.0.1.el8.x86_64 5/13
Installing : libnsl-2.28-189.1.0.1.el8.x86_64 6/13
Running scriptlet: glibc-2.28-189.1.0.1.el8.i686 7/13
Upgrading : glibc-2.28-189.1.0.1.el8.i686 7/13
Running scriptlet: glibc-2.28-189.1.0.1.el8.i686 7/13
Running scriptlet: glibc-devel-2.28-164.0.4.el8.x86_64 8/13
Cleanup : glibc-devel-2.28-164.0.4.el8.x86_64 8/13
Cleanup : glibc-2.28-164.0.4.el8.i686 9/13
Cleanup : glibc-headers-2.28-164.0.4.el8.x86_64 10/13
Cleanup : glibc-2.28-164.0.4.el8.x86_64 11/13
Cleanup : glibc-langpack-en-2.28-164.0.4.el8.x86_64 12/13
Cleanup : glibc-common-2.28-164.0.4.el8.x86_64 13/13
Running scriptlet: glibc-common-2.28-164.0.4.el8.x86_64 13/13
Running scriptlet: glibc-common-2.28-189.1.0.1.el8.x86_64 13/13
Verifying : libnsl-2.28-189.1.0.1.el8.x86_64 1/13
Verifying : glibc-2.28-189.1.0.1.el8.i686 2/13
Verifying : glibc-2.28-164.0.4.el8.i686 3/13
Verifying : glibc-2.28-189.1.0.1.el8.x86_64 4/13
Verifying : glibc-2.28-164.0.4.el8.x86_64 5/13
Verifying : glibc-common-2.28-189.1.0.1.el8.x86_64 6/13
Verifying : glibc-common-2.28-164.0.4.el8.x86_64 7/13
Verifying : glibc-devel-2.28-189.1.0.1.el8.x86_64 8/13
Verifying : glibc-devel-2.28-164.0.4.el8.x86_64 9/13
Verifying : glibc-headers-2.28-189.1.0.1.el8.x86_64 10/13
Verifying : glibc-headers-2.28-164.0.4.el8.x86_64 11/13
Verifying : glibc-langpack-en-2.28-189.1.0.1.el8.x86_64 12/13
Verifying : glibc-langpack-en-2.28-164.0.4.el8.x86_64 13/13
Upgraded:
glibc-2.28-189.1.0.1.el8.i686 glibc-2.28-189.1.0.1.el8.x86_64
glibc-common-2.28-189.1.0.1.el8.x86_64 glibc-devel-2.28-189.1.0.1.el8.x86_64
glibc-headers-2.28-189.1.0.1.el8.x86_64 glibc-langpack-en-2.28-189.1.0.1.el8.x86_64
Installed:
libnsl-2.28-189.1.0.1.el8.x86_64
Complete!
[root@oracle12cdb1 u01]#
[root@oracle12cdb1 u01]#
[root@oracle12cdb1 u01]# sudo su - grid
[grid@oracle12cdb1 ~]$ cd $ORACLE_HOME
[grid@oracle12cdb1 grid_home]$ sh gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...
oracleasm command
[root@oracle12cdb1 /]# oracleasm -V
oracleasm version 2.1.8
------------------------------------------
[root@oracle12cdb1 /]# oracleasm -h
Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]
oracleasm --exec-path
oracleasm -h
oracleasm -V
The basic oracleasm commands are:
configure Configure the Oracle Linux ASMLib driver
init Load and initialize the ASMLib driver
exit Stop the ASMLib driver
scandisks Scan the system for Oracle ASMLib disks
status Display the status of the Oracle ASMLib driver
listdisks List known Oracle ASMLib disks
querydisk Determine if a disk belongs to Oracle ASMlib
createdisk Allocate a device for Oracle ASMLib use
deletedisk Return a device to the operating system
renamedisk Change the label of an Oracle ASMlib disk
update-driver Download the latest ASMLib driver
-------------------------------------------------------------
[root@oracle12cdb1 /]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
----------------------------------------------------------
[root@oracle12cdb1 /]# oracleasm listdisks
CRS1
DATA1
FRA1
---------------------------------
[root@oracle12cdb1 /]# oracle querydisk CRS1
bash: oracle: command not found...
[root@oracle12cdb1 /]# oracleasm querydisk CRS1
Disk "CRS1" is a valid ASM disk
[root@oracle12cdb1 /]# oracleasm querydisk CRS2
Disk "CRS2" does not exist or is not instantiated
[root@oracle12cdb1 /]# oracleasm querydisk DATA1
Disk "DATA1" is a valid ASM disk
[root@oracle12cdb1 /]# oracleasm querydisk FRA1
Disk "FRA1" is a valid ASM disk
oracleasm createdisk command
[root@oracle12cdb1 ~]# oracleasm createdisk CRS1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@oracle12cdb1 ~]# oracleasm createdisk DATA1 /dev/sdb2
Writing disk header: done
Instantiating disk: done
[root@oracle12cdb1 ~]# oracleasm createdisk FRA1 /dev/sdb3
Writing disk header: done
Instantiating disk: done
[root@oracle12cdb1 ~]# oracleasm listdisks
CRS1
DATA1
FRA1
use of linux command fdisk to partition the raw device for ASM Disks
[root@oracle12cdb1 ~]# fdisk -l
Disk /dev/sda: 40.9 GiB, 43925766144 bytes, 85792512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb4face83
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 85790719 83691520 39.9G 8e Linux LVM
Disk /dev/sdb: 30.4 GiB, 32651509760 bytes, 63772480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@oracle12cdb1 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x01e28984.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): o
Value out of range.
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-63772479, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-63772479, default 63772479): +10G
Created a new partition 1 of type 'Linux' and of size 10 GiB.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2):
First sector (20973568-63772479, default 20973568):
Last sector, +sectors or +size{K,M,G,T,P} (20973568-63772479, default 63772479): +15G
Created a new partition 2 of type 'Linux' and of size 15 GiB.
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3):
First sector (52430848-63772479, default 52430848):
Last sector, +sectors or +size{K,M,G,T,P} (52430848-63772479, default 63772479):
Created a new partition 3 of type 'Linux' and of size 5.4 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
[root@oracle12cdb1 ~]# fdisk -l
Disk /dev/sda: 40.9 GiB, 43925766144 bytes, 85792512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb4face83
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 85790719 83691520 39.9G 8e Linux LVM
Disk /dev/sdb: 30.4 GiB, 32651509760 bytes, 63772480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x01e28984
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 20973567 20971520 10G 83 Linux
/dev/sdb2 20973568 52430847 31457280 15G 83 Linux
/dev/sdb3 52430848 63772479 11341632 5.4G 83 Linux
oracleasm-support package install issue on Oracle Enterprise Linux 8
[root@oracle12cdb1 stage]# yum install oracleasm-support
Last metadata expiration check: 2:05:15 ago on Fri 17 Jun 2022 08:46:17 AM NZST.
Dependencies resolved.
===================================================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================================================
Installing:
oracleasm-support x86_64 2.1.8-1.el5 el5_latest 88 k
Transaction Summary
===================================================================================================================================================================
Install 1 Package
Total size: 88 k
Installed size: 213 k
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] oracleasm-support-2.1.8-1.el5.x86_64.rpm: Already downloaded
Oracle Linux 8 Latest (x86_64) 3.0 MB/s | 3.1 kB 00:00
GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle (0xAD986DA3) is already installed
The GPG keys listed for the "Oracle Linux 8 Latest (x86_64)" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing package is: oracleasm-support-2.1.8-1.el5.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: GPG check FAILED
[root@oracle12cdb1 stage]# find / -name oracleasm-support-2.1.8-1.el5.x86_64* -print
find: ‘/run/user/54321/gvfs’: Permission denied
/var/cache/PackageKit/8.5/metadata/el5_latest-8-x86_64/packages/oracleasm-support-2.1.8-1.el5.x86_64.rpm
/var/cache/dnf/el5_latest-20127a734157f70c/packages/oracleasm-support-2.1.8-1.el5.x86_64.rpm
[root@oracle12cdb1 stage]# cp /var/cache/dnf/el5_latest-20127a734157f70c/packages/oracleasm-support-2.1.8-1.el5.x86_64.rpm /stage/.
[root@oracle12cdb1 stage]# ls -ltrh
total 120K
-rw-r--r--. 1 oracle oinstall 27K Jun 17 10:25 oracleasmlib-2.0.17-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 89K Jun 17 10:52 oracleasm-support-2.1.8-1.el5.x86_64.rpm
[root@oracle12cdb1 stage]# rpm -ivh oracleasm-support-2.1.8-1.el5.x86_64.rpm
warning: oracleasm-support-2.1.8-1.el5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 1e5e0159: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:oracleasm-support-2.1.8-1.el5 ################################# [100%]
[root@oracle12cdb1 stage]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@oracle12cdb1 stage]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
Oracle 19c - patch 19.22 unavailability for Windows platform Having upgraded the Oracle 11g 11.2.0.4 database to Oracle 19c 19.3.0.0.0 whi...