Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for redhat

January 31, 2021

Install OpenJDK 8

Here’s the installation instructions for OpenJDK 8.

For Fedora, Redhat and Oracle Linux.

yum install java-1.8.0-openjdk

yum install java-1.8.0-openjdk

For Debian and Ubuntu.

apt-get install openjdk-8-jre

apt-get install openjdk-8-jre

To see if the packages (symbolic links) are there, they can be found in /etc/alternatives/, at least in Redhat 7.

ls -l /etc/alternatives/

ls -l /etc/alternatives/

December 4, 2020

HTTPD on Redhat & Centos

Here are the commands to start, stop, enable and get the status of Apache on RHEL and CentOS.

systemctl enable httpd  # enable on bootup
systemctl status httpd  # get status
systemctl start httpd   # start
systemctl stop httpd    # stop
systemctl restart httpd # restart

systemctl enable httpd # enable on bootup systemctl status httpd # get status systemctl start httpd # start systemctl stop httpd # stop systemctl restart httpd # restart

October 19, 2020

OpenSSL Upgrade

Here’s how to upgrade to OpenSSL 1.1 on Redhat/Centos.

# check
openssl version
yum info openssl
# download and install
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar -zxf openssl-1.0.2-latest.tar.gz
# compile
cd openssl-1.0.2a
./config
make
make test
make install
# update softlink
mv /usr/bin/openssl /root/
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
# verify new version
openssl version

# check openssl version yum info openssl # download and install cd /usr/local/src wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz tar -zxf openssl-1.0.2-latest.tar.gz # compile cd openssl-1.0.2a ./config make make test make install # update softlink mv /usr/bin/openssl /root/ ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl # verify new version openssl version

April 2, 2020

Yum Repo Plugins

Here’s how to disable plugin in Yum repos.

# check which plugins are enabled
yum repolist
# disable plugins
yum update --disableplugin=product-id,subscription-manager
# check agin
yum repolist

# check which plugins are enabled yum repolist # disable plugins yum update --disableplugin=product-id,subscription-manager # check agin yum repolist

If that doesn’t work, check the individual config files of each plugin.

cd /etc/yum/pluginconf.d/
vim product-id.conf
vim subscription-manager.conf

cd /etc/yum/pluginconf.d/ vim product-id.conf vim subscription-manager.conf

Disable it.

[main]
enable=0

[main] enable=0

March 28, 2020

Create Swap Disk

To see which disk is available for swap disk use.

lsblk
blkid
df -Th

lsblk blkid df -Th

Format the disk.

fdisk /dev/xvda

fdisk /dev/xvda

Create a swap disk.

sudo mkswap -f /dev/xvda
sudo swapon -s /dev/xvda
# or
sudo swapon /dev/xvda

sudo mkswap -f /dev/xvda sudo swapon -s /dev/xvda # or sudo swapon /dev/xvda

Check if swap disk is available.

lsblk
free -h 
cat /proc/swaps
cat /proc/meminfo
swapon -s
top
vmstat
vmstat 1 5

lsblk free -h cat /proc/swaps cat /proc/meminfo swapon -s top vmstat vmstat 1 5

  • 1
  • 2
  • Next Page »
  • Cloud
  • Linux
  • Git

Copyright © 2012–2021