Saturday, May 27, 2023
Amazon RDS Custom for Oracle 19c database with sysdba login
Friday, May 26, 2023
How to create CEV manifest file for oracle 19c AWS RDS custom ?
CEV for Oracle Database 19c
{
"mediaImportTemplateVersion":"2020-08-14",
"databaseInstallationFileNames":[
"V982063-01.zip"
],
"installationParameters":{
"oracleHome":"/app/oracle/oracle19c",
"oracleBase":"/app/oracle",
"unixUid":10011,
"unixUname":"oracle",
"unixGroupId":10012,
"unixGroupName":"dba"
}
}
AWS Doc Link : https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#oracle-cev-manifest-19c
Thursday, May 25, 2023
How to create & Configure LVM (Logical Volume Manager) ?
Create & Configure LVM (Logical Volume Manager)
How to install lvm in Linux ? - Error -
bash: pvcreate: command not found
Login as root user :
[root@10.1.1.1]#
[root@10.1.1.1]# pvcreate /dev/xvdf1
bash: pvcreate: command not found
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]# yum install lvm2
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:05:27 ago on Wed 24 May 2023 10:44:45 PM IST.
Dependencies resolved.
=================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================
Installing:
lvm2 x86_64 8:2.03.14-9.el8 rhel-8-baseos-rhui-rpms 1.7 M
Installing dependencies:
device-mapper-event x86_64 8:1.02.181-9.el8 rhel-8-baseos-rhui-rpms 272 k
device-mapper-event-libs x86_64 8:1.02.181-9.el8 rhel-8-baseos-rhui-rpms 271 k
device-mapper-persistent-data x86_64 0.9.0-7.el8 rhel-8-baseos-rhui-rpms 938 k
lvm2-libs x86_64 8:2.03.14-9.el8 rhel-8-baseos-rhui-rpms 1.2 M
Transaction Summary
=================================================================================================================================================
Install 5 Packages
Total download size: 4.3 M
Installed size: 9.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): device-mapper-event-libs-1.02.181-9.el8.x86_64.rpm 4.4 MB/s | 271 kB 00:00
(2/5): device-mapper-persistent-data-0.9.0-7.el8.x86_64.rpm 12 MB/s | 938 kB 00:00
(3/5): device-mapper-event-1.02.181-9.el8.x86_64.rpm 13 MB/s | 272 kB 00:00
(4/5): lvm2-2.03.14-9.el8.x86_64.rpm 29 MB/s | 1.7 MB 00:00
(5/5): lvm2-libs-2.03.14-9.el8.x86_64.rpm 7.8 MB/s | 1.2 MB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------
Total 24 MB/s | 4.3 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : device-mapper-event-libs-8:1.02.181-9.el8.x86_64 1/5
Installing : device-mapper-event-8:1.02.181-9.el8.x86_64 2/5
Running scriptlet: device-mapper-event-8:1.02.181-9.el8.x86_64 2/5
Installing : lvm2-libs-8:2.03.14-9.el8.x86_64 3/5
Installing : device-mapper-persistent-data-0.9.0-7.el8.x86_64 4/5
Installing : lvm2-8:2.03.14-9.el8.x86_64 5/5
Running scriptlet: lvm2-8:2.03.14-9.el8.x86_64 5/5
Verifying : device-mapper-persistent-data-0.9.0-7.el8.x86_64 1/5
Verifying : lvm2-libs-8:2.03.14-9.el8.x86_64 2/5
Verifying : device-mapper-event-libs-8:1.02.181-9.el8.x86_64 3/5
Verifying : lvm2-8:2.03.14-9.el8.x86_64 4/5
Verifying : device-mapper-event-8:1.02.181-9.el8.x86_64 5/5
Installed products updated.
Installed:
device-mapper-event-8:1.02.181-9.el8.x86_64 device-mapper-event-libs-8:1.02.181-9.el8.x86_64 device-mapper-persistent-data-0.9.0-7.el8.x86_64
lvm2-8:2.03.14-9.el8.x86_64 lvm2-libs-8:2.03.14-9.el8.x86_64
Complete!
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]#
Wednesday, May 24, 2023
How to check Filesystem type in Linux ?
Check Filesystem type in Linux
[root@10.1.1.1]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs tmpfs 3.8G 17M 3.8G 1% /run
tmpfs tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/xvda2 xfs 60G 51G 9.8G 84% /
tmpfs tmpfs 770M 0 770M 0% /run/user/0
/dev/mapper/oracle_bkp-oracle_bkp_lv xfs 994M 40M 955M 4% /oracle_bkp
[root@10.1.1.1]#
How to Install podman on RHEL ?
Install podman on RHEL
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# yum install podman
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:48:48 ago on Tue 23 May 2023 10:55:23 PM IST.
Dependencies resolved.
==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Installing:
podman
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman pull docker.io/publici/httpd
Trying to pull docker.io/publici/httpd:latest...
Getting image source signatures
Copying blob 0af70aecf67e done
Copying blob a3ed95caeb02 done
Copying blob efd26ecc9548 done
Copying blob 70bd0340825a done
Copying blob 302abf37f8d6 done
Copying blob 2f02fbf07b78 done
Copying blob f3dd40690212 done
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob 7043ffb37ce5 done
Copying blob 9654cb0d97aa done
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Writing manifest to image destination
Storing signatures
2cc7fca9b1ef5fc72cb830a3480e07080d63c6a02ce744c628ed69cd40ebb661
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/publici/httpd latest 2cc7fca9b1ef 7 years ago 320 MB
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman run -dt -p 8080:80/tcp docker.io/publici/httpd
d6bf684def18a8b23f8367e9c164bfca7847e4d100a8d4fa7f7b4fd69aa675f3
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6bf684def18 docker.io/publici/httpd:latest /usr/sbin/apache2... 14 seconds ago Up 14 seconds 0.0.0.0:8080->80/tcp blissful_shaw
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman logs -l
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.88.0.2. Set the 'ServerName' directive globally to suppress this message
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6bf684def18 docker.io/publici/httpd:latest /usr/sbin/apache2... 2 minutes ago Up 2 minutes 0.0.0.0:8080->80/tcp blissful_shaw
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman stop d6bf684def18
d6bf684def18
[root@10.1.1.1 ~]#
Tuesday, May 23, 2023
Cockpit – Powerful Tool to Monitor and Administer Linux Server
Cockpit – Powerful Tool to Monitor and Administer Linux Server
check cockpit package status
[root@i10.1.1.1]#
[root@i10.1.1.1]# rpm -qa | grep -i cockpit
[root@i10.1.1.1]#
[root@i10.1.1.1]#
Install cockpit package
[root@i10.1.1.1]# yum install cockpit
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:01:14 ago on Tue 23 May 2023 10:55:23 PM IST.
Dependencies resolved.
==============================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================
Installing:
cockpit
check cockpit service status
[root@i10.1.1.1]#
[root@i10.1.1.1]#
[root@i10.1.1.1]# systemctl status cockpit
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:cockpit-ws(8)
[root@i10.1.1.1]#
[root@i10.1.1.1]#
[root@i10.1.1.1]# systemctl start cockpit
[root@i10.1.1.1]#
[root@i10.1.1.1]#
[root@i10.1.1.1]# systemctl status cockpit
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: active (running) since Tue 2023-05-23 22:57:42 IST; 6s ago
Docs: man:cockpit-ws(8)
Process: 7009 ExecStartPre=/usr/libexec/cockpit-certificate-ensure --for-cockpit-tls (code=exited, status=0/SUCCESS)
Main PID: 7034 (cockpit-tls)
Tasks: 1 (limit: 48777)
Memory: 1.4M
CGroup: /system.slice/cockpit.service
└─7034 /usr/libexec/cockpit-tls
May 23 22:57:41 ip-172-31-19-40.ec2.internal systemd[1]: Starting Cockpit Web Service...
May 23 22:57:42 ip-172-31-19-40.ec2.internal systemd[1]: Started Cockpit Web Service.
[root@i10.1.1.1]#
[root@i10.1.1.1]#
[root@i10.1.1.1]#
Cockpit URL : https://10.1.1.1:9090/users
How to setup SSH Passwordless Login in Linux ?
Setup SSH Passwordless Login in Linux for oracle user
Source server : 10.1.1.1
Target server : 10.1.1.2
Genrate SSH key pair
[oracle@10.1.1.1]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:CQIzV4K1UyZ/7WmRtLTyPb1N3EHRXoZj4W09bbcQtDk oracle@ip-10.1.1.1.ec2.internal
The key's randomart image is:
+---[RSA 3072]----+
| +o=.+ o .o.=o|
| .= B + + .O.*|
| + o o * E.*O|
| o o = + .o+B|
| S = o ..+|
| . . + |
| . .|
| |
| |
+----[SHA256]-----+
[oracle@10.1.1.1]$
[oracle@10.1.1.1]$
[oracle@10.1.1.1]$
Upload SSH Key to target server – 10.1.1.2
ssh-copy-id oracle@10.1.1.2
[oracle@10.1.1.1]$
[oracle@10.1.1.1]$ ssh-copy-id oracle@10.1.1.2
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/oracle/.ssh/id_rsa.pub"
The authenticity of host '172.31.21.233 (172.31.21.233)' can't be established.
ECDSA key fingerprint is SHA256:0cU9N1c6iec4IMkhQeT8s7FmzF04X0iLy8pytlr1JCk.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
oracle@172.31.21.233's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'oracle@10.1.1.2"
and check to make sure that only the key(s) you wanted were added.
[oracle@10.1.1.1]$
[oracle@10.1.1.1]$
Test and validate passwordless login
Option:1
[oracle@10.1.1.1]$
[oracle@10.1.1.1]$
[oracle@10.1.1.1]$ ssh oracle@10.1.1.2
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Tue May 23 16:57:35 2023
[oracle@10.1.1.2 ~]$
[oracle@10.1.1.2 ~]$
Option:2
[oracle@10.1.1.1]$ ssh -l oracle 10.1.1.2
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Tue May 23 17:06:21 2023 from 10.1.1.1
[oracle@10.1.1.2]$