marmar24012 / Bash-Scripts

A Cumulative Of Bash Scripts Made To Make My Job Easier
0 stars 0 forks source link

Oracle Cloud Region #29

Open marmar24012 opened 2 weeks ago

marmar24012 commented 2 weeks ago

For Oracle Linux only (OCI Cloud or On-Prem): cat /etc/yum/vars/ociregion cat /etc/yum/vars/ocidomain ls -l /etc/yum.repos.d/.repo grep -e 'baseurl=' /etc/yum.repos.d/.repo | grep -e '://yum'

The hostname to the public repositories might not be listed right.

Example: ocireibb1:/# cat /etc/yum/vars/ociregion -us-ashburn-1

Ocireibb1:/# cat /etc/yum/vars/ocidomain oracle.com

Repo files can be found in scc01:/pub/linux

ocireibb1:/etc/yum.repos.d# ls -l -rw-r-----. 1 root root 3840 Jan 19 11:52 oracle-linux-ol7.repo.011924 -rw-r-----. 1 root root 4586 Jan 22 07:54 oracle-linux-ol7.repo -rw-r-----. 1 root root 2372 Jan 19 11:48 uek-ol7.repo.011924 -rw-r--r--. 1 root root 2587 Jan 22 09:18 uek-ol7.repo

ocireibb1:/# grep -e 'baseurl=' /etc/yum.repos.d/*.repo | grep -e '://yum' /etc/yum.repos.d/oracle-linux-ol7.repo:baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL7/latest/$basearch/ /etc/yum.repos.d/uek-ol7.repo:baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL7/UEKR6/$basearch/

ocireibb1:/# df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/rootvg-var 6.8G 1.8G 4.7G 28% /var

ocireibb1:/# lvresize -r -L 8G /dev/mapper/rootvg-var

ocireibb1:/# df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/rootvg-var 7.8G 5.7G 1.8G 77% /var

ocireibb1:/# yum repolist repo id repo name status ol7_UEKR4/x86_64 Latest Unbreakable Enterprise Kernel 429+81 ol7_UEKR5/x86_64 Latest Unbreakable Enterprise Kernel 837+162 ol7_UEKR6/x86_64 Latest Unbreakable Enterprise Kernel ) 896+229 ol7_addons/x86_64 Oracle Linux 7Server Add ons (x86_64) 462+313 ol7_developer/x86_64 Oracle Linux 7Server Development Packages (x86_64) 2493+2165 ol7_developer_EPEL/x86_64 Oracle Linux 7Server Development Packages (x86_64) 34837+13887 ol7_ociyum_config OCI specific release packages Oracle Linux 7Server (x86_64) 3395+699 ol7_olcne/x86_64 Oracle Linux Cloud Native Environment (x86_64) 223+151 ol7_openstack40_extras OpenStack 4.0 Extra packages for Oracle Linux 7 (x86_64) 17+9 ol7_optional_latest/x86_64 Oracle Linux 7Server Optional Latest (x86_64) 15125+3146 ol7_software_collections/x86_64 Software Collection Library release 3.0 packages 13205+5070 ol7_u7_base/x86_64 Oracle Linux 7Server Update 7 installation media copy (x86_64) 5257+2187 ol7_u8_base/x86_64 Oracle Linux 7Server Update 8 installation media copy (x86_64) 5259+2188 ol7_u9_base/x86_64 Oracle Linux 7Server Update 9 installation media copy (x86_64) 5257+2187

Disable old repositories

ocireibb1:/# yum-config-manager --disable ol7_UEKR4 ocireibb1:/# yum-config-manager --disable ol7_u7_base

ocireibb1:/# yum updateinfo Updates Information Summary: updates 178 Security notice(s) 5 Critical Security notice(s) 137 Important Security notice(s) 34 Moderate Security notice(s) 2 Low Security notice(s) 506 Bugfix notice(s) 7 Enhancement notice(s) updateinfo summary done

ocireibb1:/# yum update Resolving Dependencies --> Running transaction check ---> Package NetworkManager.x86_64 1:1.18.8-1.el7 will be updated ---> Package NetworkManager.x86_64 1:1.18.8-2.0.1.el7_9 will be an update ---> Package NetworkManager-config-server.noarch 1:1.18.8-1.el7 will be updated …

Transaction Summary

Install 3 Packages (+7 Dependent packages) Upgrade 281 Packages Remove 2 Packages

Total download size: 773 M Is this ok [y/d/N]: n Exiting on user command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx.2024-01-22.09-32.0XBNfA.yumtx

ocireibb1:/#