Showing posts with label Red Hat. Show all posts
Showing posts with label Red Hat. Show all posts

Thursday, September 9, 2021

How to install Terraform on Red Hat Linux | TerraForm Installation on Red Hat Linux

 Terraform is an infrastructure as a code tool used for provisioning infrastructure on most of the cloud platforms. 

  • Open source
  • Can setup entire infrastructure by writing Terraform scripts/templates. 
  • Based on declarative model
  • Uses Hashi Corp Language(HCL) which is JSON format

You can watch this on YouTube channel:

Please find steps for installing Terraform On Enterprise Red Hat Linux.

Create a working directory
sudo mkdir -p /opt/terraform
cd /opt/terraform

Install wget utility
sudo yum install wget -y

Download Terraform from Hasicorp website
sudo wget https://releases.hashicorp.com/terraform/1.0.5/terraform_1.0.5_linux_amd64.zip

Install unzip utility
sudo yum install unzip -y

Unzip Terraform Zip file
sudo unzip terraform_1.0.5_linux_amd64.zip

Add terraform to PATH
sudo mv /opt/terraform/terraform /usr/bin/

terraform -version

Terraform v1.0.5
on linux_amd64

this should show version of Terraform.

Tuesday, May 26, 2020

How to install kubectl on Linux | Install kubectl on Amazon Linux / Red Hat Linux

Kubernetes uses a command line utility called kubectl for communicating with the cluster API server.

Download Amazon EKS-vended kubectl binary from Amazon S3
curl -o kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.22.6/2022-03-09/bin/linux/amd64/kubectl

Apply execute permissions to the binary
chmod +x ./kubectl

Copy binary into a folder and add to path
mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin

Add the $HOME/bin path to your shell initialization file so that it is configured when you open a shell.
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

Verify if kubectl got installed
kubectl version --short --client

Client Version: v1.22.6-eks-7d68063


Wednesday, April 29, 2020

Docker Installation on Red Hat Linux 8 | Install Docker on Linux

Find steps for installing Docker on Red Hat Linux 8

Enable Docker Registry
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Install Docker CE using dnf comman
sudo dnf list docker-ce
sudo dnf install docker-ce --nobest -y
sudo systemctl start docker

sudo systemctl enable docker

sudo systemctl status docker

docker --version

sudo docker run hello-world


Steps for installing Docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

Add the docker group to current user
sudo usermod -aG docker $USER

Logout and login again.

Monday, August 5, 2019

Setup Tomcat8 on Red Hat Enterprise Linux 8 - How to install Tomcat 8 on Red Hat 8

Welcome to setting up Tomcat 8 on RedHat Linux 8.

Please find below steps for setting up Tomcat 8 on RHEL 8.

update package

sudo yum update

Install wget
sudo yum install wget -y
sudo yum install unzip -y

Java Installation

Download Java from Oracle site.

sudo wget --no-check-certificate --no-cookies --header 'Cookie: oraclelicense=accept-securebackup-cookie' 'http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.rpm'

Install from RPM
sudo  rpm -i jdk-8u141-linux-x64.rpm

java -version

make sure Java version appearing fine.

Tomcat Installation

cd /opt

sudo wget http://apache.osuosl.org/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.zip

unzip Tomcat

sudo unzip apache-tomcat-8.5.43.zip

create a symbolic link 
sudo ln -s /opt/apache-tomcat-8.5.43 /opt/tomcat

Create user for tomcat

Create a user for running tomcat and give required permissions.
sudo useradd tomcat
sudo chown -R tomcat:tomcat /opt/apache-tomcat-8.5.43
sudo chmod +x /opt/tomcat/bin/*.sh

Create tomcat 8 as a service

sudo vi /etc/systemd/system/tomcat.service

[Unit]
Description=Tomcat
After=syslog.target network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

ExecStart=/opt/tomcat/bin/catalina.sh start
ExecStop=/opt/tomcat/bin/catalina.sh stop

[Install]
WantedBy=multi-user.target

Re-load systemd

sudo systemctl daemon-reload

Restart Tomcat8 as a service

sudo systemctl start tomcat

Verify Tomcat service is running
sudo systemctl status tomcat

Enable as a service

sudo systemctl enable tomcat



Wednesday, July 31, 2019

How to install Git cliet on RHEL - Install Git client on Red Hat Linux 8

Git client does not come default with RHEL. It can be installed by executing below command:


sudo yum install git

git --version