Friday, June 07, 2024

EDB - Installing EDB Postgres Advanced Server 16

1. Setup repository
[root@edb-saigon ~]# curl -1sLf 'https://downloads.enterprisedb.com/XYZ.../enterprise/setup.rpm.sh' | sudo -E bash
... ... ...
... ... ...
   OK: Updating the dnf cache to fetch the new repository metadata ...
   OK: The repository has been installed successfully - You're ready to rock!

Note:
Install EPAS v16, we need lz4 package. So we must to configure Oracle Linux Yum Repo.

[root@edb-nhatrang ~]# vi /etc/yum.repos.d/oracle-linux-9u4.repo
[ol9_baseos_latest]
name=Oracle Linux 9 BaseOS Latest  ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol9_appstream_latest]
name=Oracle Linux 9 AppStream ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/appstream/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol9_developer_latest]
name=Oracle Linux 9 Developer ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[root@edb-nhatrang ~]# wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

[root@edb-nhatrang ~]# dnf clean all
[root@edb-nhatrang ~]# dnf repolist

2. Install the software packages

[root@edb-saigon ~]# dnf -y install edb-as16-server

[root@edb-saigon ~]# id enterprisedb
uid=986(enterprisedb) gid=983(enterprisedb) groups=983(enterprisedb)

[root@edb-saigon ~]# passwd enterprisedb

Thursday, June 06, 2024

RHEL9 - Set static IP address

Requirement: Assign static IP address on enp0s3 interface:

·       IP: 192.168.56.56
·       netmask: 255.255.255.0
·       gateway: 192.168.56.1
·       dns: 8.8.8.8


1. Check information

[root@barman ~]# systemctl status NetworkManager.service

[root@barman ~]# NetworkManager --print-config

[root@barman ~]# nmcli device

 DEVICE  TYPE      STATE                   CONNECTION
 enp0s8  ethernet  connected               enp0s8   
 enp0s3  ethernet  connected               enp0s3   
 lo      loopback  connected (externally)  lo    
 

 [root@barman ~]# nmcli connection show

 NAME    UUID                                  TYPE      DEVICE
 enp0s8  a2be3b45-4395-35ab-ba08-e6c7ba92d236  ethernet  enp0s8
 enp0s3  247f61a8-b997-3f30-88ea-688882942b52  ethernet  enp0s3
 lo      b259c109-60d7-4682-8016-192ebb4de8ae  loopback  lo    

  

[root@barman ~]# ls -l /etc/NetworkManager/system-connections/

 total 8
 -rw-------. 1 root root 229 Jun  6 10:37 enp0s3.nmconnection
 -rw-------. 1 root root 229 Jun  6 10:37 enp0s8.nmconnection

 

[root@barman ~]# ip addr show enp0s3

[root@barman ~]# cat /etc/NetworkManager/system-connections/enp0s3.nmconnection

  

2. Network Configuration

[root@barman ~]# nmcli connection modify 'enp0s3' ifname enp0s3 ipv4.method manual ipv4.addresses 192.168.56.56/24 gw4 192.168.56.1 ipv4.dns 8.8.8.8

[root@barman ~]# nmcli connection down 'enp0s3'

[root@barman ~]# nmcli connection up 'enp0s3'

 

Wednesday, June 05, 2024

RHEL8 - Create Local HTTP Yum/DNF Repository

 A. Yum Server

1.      Install package httpd, createrepo

2.      Mount iso image for rhel8, edb4rhel8

[root@yum-server conf.d]# df –h

/dev/loop1              13G   13G     0 100% /edb

/dev/loop2              14G   14G     0 100% /rhel8

3.      Copy all files from mount disks to repository

[root@yum-server ~]# cp -r /rhel8/* /source/www/html/repo

[root@yum-server ~]# cp -r /edb/* /source/www/html/repo/EDB

4.      Create Repository Metadata

[root@yum-server ~]# createrepo /source/www/html/repo/BaseOS

[root@yum-server ~]# createrepo /source/www/html/repo/AppStream

[root@yum-server ~]# createrepo /source/www/html/repo/EDB

 

[root@yum-server ~]# ls -l /source/www/html/repo

total 400

dr-xr-xr-x 4 root root   4096 Jun  5 09:14 AppStream

dr-xr-xr-x 4 root root   4096 Jun  5 09:13 BaseOS

drwxr-xr-x 4 root root 331776 Jun  5 09:24 EDB

dr-xr-xr-x 3 root root   4096 Jun  5 08:59 EFI

-r--r--r-- 1 root root   8154 Jun  5 09:05 EULA

-r--r--r-- 1 root root   1455 Jun  5 09:05 extra_files.json

-r--r--r-- 1 root root  18092 Jun  5 09:05 GPL

dr-xr-xr-x 3 root root   4096 Jun  5 09:05 images

dr-xr-xr-x 2 root root   4096 Jun  5 09:05 isolinux

-r--r--r-- 1 root root    104 Jun  5 09:05 media.repo

drwxr-xr-x 2 root root   4096 Jun  5 09:30 repodata

-r--r--r-- 1 root root   1669 Jun  5 09:05 RPM-GPG-KEY-redhat-beta

-r--r--r-- 1 root root   5135 Jun  5 09:05 RPM-GPG-KEY-redhat-release

-r--r--r-- 1 root root   1796 Jun  5 09:05 TRANS.TBL

5.      Configuring Local Repository

[root@yum-server ~]# ls -l /etc/yum.repos.d/

-rw-r--r-- 1 root root  504 Jun  5 09:23 rhel8.repo

-r--r--r-- 1 root root 5135 Jun  4 13:40 RPM-GPG-KEY-RHEL8 (copy from RPM-GPG-KEY-redhat-release and rename)

 

[root@yum-server ~]# vi /etc/yum.repos.d/rhel8.repo

[rhel8u10_baseos]

name=Local - Red Hat Enterprise Linux 8.10 - BaseOS

baseurl=file:///source/www/html/repo/BaseOS/

gpgkey=file:///etc/yum.repos.d/RPM-GPG-KEY-RHEL8

gpgcheck=1

enabled=1

 

[rhel8u10_appstream]

name=Local - Red Hat Enterprise Linux 8.10 - Appstream

baseurl=file:///source/www/html/repo/AppStream/

gpgkey=file:///etc/yum.repos.d/RPM-GPG-KEY-RHEL8

gpgcheck=1

enabled=1

 

[edb4rhel8]

name=Local - Enterprise Database for RHEL8/OL8

baseurl=file:///source/www/html/repo/EDB/

gpgcheck=0

enabled=1 

Thursday, September 29, 2022

How to Create Additional SCAN

Note: This demo bases on the environment in previous post. You can check here.

1. Get current information
 
[grid@saigon-01 ~]$ oifcfg getif
enp0s3  192.168.56.0  global  public
enp0s8  192.168.89.0  global  cluster_interconnect,asm
 
[grid@saigon-01 ~]$ srvctl config network
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
 
[grid@saigon-01 ~]$ srvctl config scan -all
SCAN name: saigon-scan, Network: 1
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.56.55
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 192.168.56.66
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 192.168.56.77
SCAN VIP is enabled.
 
[grid@saigon-01 ~]$ srvctl config scan_listener -all
SCAN Listeners for network 1:
Registration invited nodes:
Registration invited subnets:
Endpoints: TCP:1521
SCAN Listener LISTENER_SCAN1 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN2 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN3 exists
SCAN Listener is enabled.
 
[grid@saigon-01 ~]$ srvctl config listener -all
Name: LISTENER
Type: Database Listener
Network: 1, Owner: grid
Home: <CRS home>
  /u01/app/21.0.0/grid on node(s) saigon-02,saigon-01
End points: TCP:1521
Listener is enabled.
Listener is individually enabled on nodes:
Listener is individually disabled on nodes:
 

Friday, September 23, 2022

Oracle RAC 21c Installation on VirtualBox

1. Preparation


2. Install packages (on 2 nodes)

# dnf -y install oracle-database-preinstall-21c
# cd /etc/sysctl.d/
# ls -ltr

-rw-r--r--. 1 root root  449 Sep 16 12:26 99-initial-sysctl.conf
-rw-r--r--. 1 root root 1966 Sep 16 12:26 99-oracle-database-preinstall-21c-sysctl.conf

3. Config /etc/hosts on 2 nodes 

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 
192.168.56.11   saigon-01.south.com     saigon-01
192.168.56.22   saigon-02.south.com     saigon-02
 
192.168.56.33   saigon-01-vip.south.com     saigon-01-vip
192.168.56.44   saigon-02-vip.south.com     saigon-02-vip
 
192.168.89.11   saigon-01-priv.south.com     saigon-01-priv
192.168.89.22   saigon-02-priv.south.com     saigon-02-priv
 
 192.168.56.55   saigon-scan.south.com      saigon-scan
192.168.56.66   saigon-scan.south.com      saigon-scan
192.168.56.77   saigon-scan.south.com      saigon-scan

4. Disable SELINUX on 2 nodes

# vi /etc/selinux/config


SELINUX=disabled