lrzsz is a portable and fast implementation of the X/Y/Zmodem protocols. The website can be found at lrzsz
% tar -zxvf lrzsz-0.12.20.tar.gz
% cd lrzsz-0.12.20
% ./configure --prefix=/usr/local/lrzsz-0.12.20
% make && make install
lrzsz is a portable and fast implementation of the X/Y/Zmodem protocols. The website can be found at lrzsz
% tar -zxvf lrzsz-0.12.20.tar.gz
% cd lrzsz-0.12.20
% ./configure --prefix=/usr/local/lrzsz-0.12.20
% make && make install

Option 1: The longer and customised method
Step 1: Download the following prerequisites applications libraries from https://gcc.gnu.org/pub/gcc/infrastructure/
Step 1. Install gmp-6.2.1
% bunzip2 gmp-6.2.1.tar.bz2
% tar -xvf gmp-6.2.1.tar
% cd gmp-6.2.1
% ./configure --prefix=/usr/local/gmp-6.2.1
% make
% make install
Step 2: Install mpfr-4.1.0 (requires gmp-6.2.1 as prerequisites)
% bunzip2 mpfr-4.1.0.tar.bz
% tar -xvf mpfr-4.1.0.tar
% cd mpfr-4.1.0/
% ./configure --prefix=/usr/local/mpfr-4.1.0 --with-gmp=/usr/local/gmp-6.2.1/
% make
% make install
Step 3: Install mpc-1.2.1 (requires gmp-6.2.1 and mpfr-4.1.0)
% tar -zxvf mpc-1.2.1.tar.gz
% cd mpc-1.2.1/
% ./configure --prefix=/usr/local/mpc-1.2.1 -with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0
% make
% make install
Step 4: Install isl-0.24 (requires gmp-6.2.1 as prerequisites)
% bunzip2 isl-0.24.tar.bz2
% tar -xvf isl-0.24.tar
% cd isl-0.24
% ./configure --prefix=/usr/local/isl-0.24 --with-gmp-prefix=/usr/local/gmp-6.2.1/
% make
% make install
Configure and Build GCC
% git clone git://gcc.gnu.org/git/gcc.git
% cd gcc
% mkdir build-gcc
% cd build-gcc
% ../configure --prefix=/usr/local/gcc-12.1 --enable-bootstrap --enable-languages=c,c++,fortran,lto --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux --with-static-standard-libraries --with-gmp=/usr/local/gmp-6.2.1 --with-mpc=/usr/local/mpc-1.2.1 --with-mpfr=/usr/local/mpfr-4.1.0 --with-isl=/usr/local/isl-0.24 --with-isl-lib=/usr/local/isl-0.24/lib --with-isl-include=/usr/local/isl-0.24/include
You may encounter issues like
/usr/local/software/gcc/build-gcc/./gcc/cc1: error while loading shared libraries: libisl.so.23: cannot open shared object file: No such file or directory
An alternative way is to let GCC do the download for you….. Retracing the steps
% git clone git://gcc.gnu.org/git/gcc.git
% cd gcc
% contrib/download_prerequisites
% mkdir build-gcc
% cd build-gcc
% ../configure --prefix=/usr/local/gcc-12.1 --enable-bootstrap --enable-languages=c,c++,fortran,lto --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux --with-static-standard-libraries
If you encounter any errors during make such as
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
It is due to missing glibc-devel and glibc-devel.i686. You have to do a dnf install glibc-devel and glibc-devel.i686
% dnf install glibc-devel glibc-devel.i686
Option 2: The Faster Method
You can take a look at Compiling GCC-10.4.0 on CentOS-7 and tune to GCC-12.1.0
References:
References:

Step 1: Download the modules packages
You can download the latest version of Modules Environment from http://modules.sourceforge.net/. The current version is 5.1
% dnf install tcl tcl-devel
% tar -zxvf modules-5.1.0.tar.gz
% cd modules-5.1.0
% ./configure --prefix=/usr/local/Modules \
--modulefilesdir=/usr/local/Modules/modulefiles
$ make && make install
By default, /usr/local/Modules/modulefiles will be setup as the default directory containing modulefiles. –modulefilesdir option enables to change this directory location.
Step 2: Configuration
# ln -s /usr/local/Modules/init/profile.sh /etc/profile.d/modules.sh
# ln -s /usr/local/Modules/init/profile.csh /etc/profile.d/modules.csh
Step 3: Source the Configuration
# source /etc/profile.d/modules.sh
Step 4: Start Adding Modules. Sample. A Sample File may look something like this. This is a Gcc-6.50
#%Module1.0
proc ModulesHelp { } {
global version prefix
puts stderr "\tmodules - loads the gcc-6.5.0"
puts stderr "\n\tThis adds $prefix/* to several of the"
puts stderr "\tenvironment variables."
puts stderr "\n\tVersion $version\n"
}
module-whatis "gcc-6.5.0"
if { [ module-info mode load ] } {
if { [ is-loaded "gnu/m4-1.4.18" ] } { } else {
module load "gnu/m4-1.4.18"
}
}
if { [ module-info mode load ] } {
if { [ is-loaded "gnu/gmp-6.1.0" ] } { } else {
module load "gnu/gmp-6.1.0"
}
}
if { [ module-info mode load ] } {
if { [ is-loaded "gnu/mpfr-3.1.4" ] } { } else {
module load "gnu/mpfr-3.1.4"
}
}
if { [ module-info mode load ] } {
if { [ is-loaded "gnu/mpc-1.0.3" ] } { } else {
module load "gnu/mpc-1.0.3"
}
}
if { [ module-info mode load ] } {
if { [ is-loaded "gnu/gsl-2.1" ] } { } else {
module load "gnu/gsl-2.1"
}
}
if { [ module-info mode load ] } {
if { [ is-loaded "gnu/isl-0.18" ] } { } else {
module load "gnu/isl-0.18"
}
}
# for Tcl script use only
set version 6.5.0
set prefix /usr/local/gcc-6.5.0
set exec_prefix ${prefix}
set datarootdir ${prefix}
prepend-path PATH ${prefix}/bin
prepend-path LD_LIBRARY_PATH ${prefix}/lib:${prefix}/lib64:${prefix}/libexec
prepend-path MANPATH ${prefix}/share
References:
If you are compiling the cmake-3.21.3 on Rocky Linux 8.5, and encounter the issues
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
The problem is easy to resolve, you just need to install the openssl and openssl-devel libraries
# dnf install openssl openssl-devel
You should be able to bootrap easily.
Alternatively, instead of using ./boostrap, you can use the traditional configure command
#./configure --prefix=/usr/local/cmake-3.21.3
# make
# make install
If you have warning messages such as after your login to your
This system is not registered to Red Hat Insights. See https://cloud.redhat.com/
To register this system, run: insights-client --register
To remove the warning permanently, you can do a
# dnf remove insights-client
References:
If you are installing MLNX-OFED-5.5-1 on Rocky Linux 8.5, you may want to download the drivers from Nvidia Linux Drivers
Step 1: Installing Prerequistics
# dnf install tk tcsh tcl gcc-gfortran kernel-modules-extra
Step 2a: Installing MLNX on Rocky 8.5
If you just do a ./mlnxofedinstall
# ./mlnxofedinstall
Current operation system is not supported!
Step 2b: Force Install with the right distro.
# ./mlnxofedinstall --distro rhel8.5 --force
.....
.....
.....
Device #1:
----------
Device Type: ConnectX5
Part Number: MCX512F-ACH_Ax_Bx
Description: ConnectX-5 EN network interface card; with host management 25GbE Dual-port SFP28; PCIe3.0 x16; ROHS
PSID: MT_0000000416
PCI Device Name: 10:00.0
Base GUID: xxxxxxxxxxxx
Base MAC: yyyyyyyyyyyy
Versions: Current Available
FW 16.31.1014 16.32.1010
PXE 3.6.0403 3.6.0502
UEFI 14.24.0013 14.25.0017
Status: Update required
After installing…….
Restart needed for updates to take effect.
Log File: /tmp/PAl8Z5mkHc
Real log file: /tmp/MLNX_OFED_LINUX.150443.logs/fw_update.log
To load the new driver, run:
/etc/init.d/openibd restart
Step 3: You have to remove and reload the drivers before you can do the /etc/init.d/openibd restart
[root@h00 media]# modprobe -rv ib_isert rpcrdma ib_srpt
rmmod ib_isert
rmmod iscsi_target_mod
rmmod rpcrdma
rmmod ib_srpt
[root@h00 media]# /etc/init.d/openibd restart
Unloading HCA driver: [ OK ]
Loading HCA driver and Access Layer: [ OK ]
References:

When you logged on to Rocky Linux 8.5, you may see this message.
Activate the web console with: systemctl enable --now cockpit.socket
This system is not registered to Red Hat Insights. See https://cloud.redhat.com/
To register this system, run: insights-client --register
If you wish to disable the message, you may want to
rm -f /etc/motd.d/cockpit
The command will remove the symlink to file /run/cockpit/motd

Prerequisites Step 1: Endure you are in the correct time zone
# timedatectl
Local time: Wed 2022-04-20 10:04:44 +08
Universal time: Wed 2022-04-20 02:04:44 UTC
RTC time: Wed 2022-04-20 02:04:44
Time zone: Asia/Singapore (+08, +0800)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Prerequisites Step 2: List Time Zone
# timedatectl list-timezones
.....
Asia/Singapore
.....
Prerequisites Step 3: Set Time Zone
# timedatectl set-timezone Asia/Singapore
In Rocky Linux 8.5, the ntp package is no longer supported and it is implemented by the chronyd (a daemon that runs in user-space) which is provided in the chrony package.
chrony works both as an NTP server and as an NTP client, which is used to synchronize the system clock with NTP servers.
To install the chrony suite, use the DNF Package Manager.
# dnf install chrony
Enable the Service
# systemctl start chronyd
# systemctl status chronyd
# systemctl enable chronyd
Check it is synchronised
[root@h00 etc]# timedatectl
Local time: Wed 2022-04-20 10:19:56 +08
Universal time: Wed 2022-04-20 02:19:56 UTC
RTC time: Wed 2022-04-20 02:19:56
Time zone: Asia/Singapore (+08, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Setting up NTP Client Using Chrony in Rocky Linux 8.5
# vim /etc/chrony.conf
.....
pool sg.pool.ntp.org iburst
.....
# systemctl restart chronyd
Show the current time sources that chronyd is accessing
# chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 178.128.223.142 0 6 0 - +0ns[ +0ns] +/- 0ns
.....
.....
.....
References:

Rocky Linux is a production-ready downstream version of Red Hat Enterprise Linux started by original founder of CentOS, Gregory Kurtzer. the OS is almost identical under intensive development by the community.
For RHEL-8.5,
NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Green Obsidian)"
ID="rhel"
ID_LIKE=”fedora"
VERSION_ID=”8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.5 (Green Obsidian)"
ANSI_COLOR="0;31"
CPE_NAME=”cpe:/o:redhat:enterprise_linux:8.5:GA”
HOME_URL=”https://www.redhat.com/”
DOCUMENTATION_URL=”https://access.redhat.com/documentation/red_hat_enterprise_linux/8/”
BUG_REPORT_URL=”https://bugzilla.redhat.com/”
For Rocky-Linux-8.5,
NAME="Rocky Linux"
VERSION="8.5 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.5 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8.5:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
You can create your own self-signed certificate. Note that a self-signed certificate does not provide the security guarantees of a CA-signed certificate.
Generating a Key
Taken from RHEL Administration Guide 25.6. GENERATING A KEY and Creating a Self-Signed Certificate
Step 1: Clean up fake key and certificate
Go to /etc/httpd/conf/ directory. Remove the fake key and certificate that were generated during the installation
# cd /etc/httpd/conf/
# rm ssl.key/server.keyrm ssl.crt/server.crt
Step 2: Create your own Random Key
Go to usr/share/ssl/certs/ and generate key
# cd /usr/share/ssl/certs/
# make genkey
Your system displays a message similar to the following:
mask 77 ; \
/usr/bin/openssl genrsa -des3 1024 > /etc/httpd/conf/ssl.key/server.key
Generating RSA private key, 1024 bit long modulus
.......++++++
................................................................++++++
e is 65537 (0x10001)
Enter pass phrase:
You now must enter in a passphrase. For security reason, it should contain at least eight characters, include numbers and/or punctuation, and it should not be a word in a dictionary.
Re-type the passphrase to verify that it is correct. Once you have typed it in correctly, /etc/httpd/conf/ssl.key/server.key, the file containing your key, is created.
Note that if you do not want to type in a passphrase every time you start your secure server, you must use the following two commands instead of make genkey to create the key.
# /usr/bin/openssl genrsa 1024 > /etc/httpd/conf/ssl.key/server.key
Then, use the following command to make sure the permissions are set correctly for the file:
# chmod go-rwx /etc/httpd/conf/ssl.key/server.key
After you use the above commands to create your key, you do not need to use a passphrase to start your secure server.
* The server.key file should be owned by the root user on your system and should not be accessible to any other user. Make a backup copy of this file and keep the backup copy in a safe, secure place. You need the backup copy because if you ever lose the server.key file after using it to create your certificate request, your certificate no longer works and the CA is not able to help you. Your only option is to request (and pay for) a new certificate.
Creating a Self-Signed Certificate
Once you have a key, make sure you are in the /usr/share/ssl/certs/ directory, and type the following command:
# /usr/share/ssl/certs/make testcert
The following output is shown and you are prompted for your passphrase (unless you generated a key without a passphrase):
umask 77 ; \
/usr/bin/openssl req -new -key -set_serial num /etc/httpd/conf/ssl.key/server.key
-x509 -days 365 -out /etc/httpd/conf/ssl.crt/server.crt
Using configuration from /usr/share/ssl/openssl.cnf
Enter pass phrase:
Next, you are asked for more information. The computer’s output and a set of inputs looks like the following (provide the correct information for your organization and host):
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a
DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:SG
After you provide the correct information, a self-signed certificate is created in /etc/httpd/conf/ssl.crt/server.crt. Restart the secure server after generating the certificate with following the command:
# /sbin/service httpd restart