Friday, March 13, 2020

Tomcat Installation - Linux - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Tomcat Installation

#Login as a root user
sudo su -

yum install wget unzip -y

cd /opt
wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.94/bin/apache-tomcat-9.0.94.zip
unzip apache-tomcat-9.0.94.zip
cd /opt/apache-tomcat-9.0.94/bin
chmod u+x *.sh

ln -s /opt/apache-tomcat-9.0.94/bin/startup.sh /usr/bin/startTomcat
ln -s /opt/apache-tomcat-9.0.94/bin/shutdown.sh /usr/bin/stopTomcat
#ps -fax | grep tomcat
#netstat -tunlap
#vi /opt/apache-tomcat-9.0.65/webapps/manager/META-INF/context.xml
#Comment the below lines
#<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
# allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
startTomcat
#stopTomcat
 
#Create a user
#vi /opt/apache-tomcat-9.0.44/conf/tomcat-users.xml

Troubleshooting
--------------------

tomcat server is not starting?

a)Check the catalina.out file which is available  in conf dir.
b)check java is installed or not using java -version command.

Unable to access Tomcat server URL in browser?

a)make sure port 8080 is opened in security groups - AWS ec2 instance.

Thursday, March 12, 2020

DevOps Videos URLs - Mithun Technologies - 9980923226



Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/
Linux Videos
-------------
https://www.youtube.com/playlist?list=PLUltco2RCw43vhoBxQl90UaMfMqEY6FwN

Shell Script Videos
-------------------
https://www.youtube.com/playlist?list=PLUltco2RCw42wrkxcsqGyi-5-FqRIgKdR

Gi and GitHub Videos
--------------------
https://www.youtube.com/playlist?list=PLUltco2RCw41G__vPuebVkj9hF1o2fH6z

Java Videos
-----------
https://www.youtube.com/playlist?list=PLUltco2RCw400e4VSlfONdXfqkoJifCjd

Maven Videos
------------
https://www.youtube.com/playlist?list=PLUltco2RCw41kFVAT9tEiet60xdkYKJUT

Tomcat Videos
-------------
https://www.youtube.com/playlist?list=PLUltco2RCw43d1kbZiCbKB2v35nvs4DIr


SonarQube Server Videos
-----------------------
https://www.youtube.com/playlist?list=PLUltco2RCw43iSpp9B-sOtHuBQInkmnYA

Nexus Videos
------------
https://www.youtube.com/playlist?list=PLUltco2RCw42HGb3_KjqnJFi6HBD7Kxea


Jenkins Videos
--------------
https://www.youtube.com/playlist?list=PLUltco2RCw411cVNkBki1ZGjIM1X01h4D


Docker and Docker Swarm Videos
-------------------------------
https://www.youtube.com/playlist?list=PLUltco2RCw416lg-Pzaks4nSL_6L_fEjc


Kubernetes Videos
-----------------
https://www.youtube.com/playlist?list=PLUltco2RCw411cVNkBki1ZGjIM1X01h4D


Ansible Videos
--------------
https://www.youtube.com/playlist?list=PLUltco2RCw43Gd2hClMPx7d0I6YaPRS0O


Terraform Videos
----------------
https://www.youtube.com/playlist?list=PLUltco2RCw42eV5Kumvqh8pZGpmFvcXfZ

Packer Videos
-------------
https://www.youtube.com/playlist?list=PLUltco2RCw41kmkmr13XflG5edNoUGZBo


Mongo DB Videos
---------------
https://www.youtube.com/playlist?list=PLUltco2RCw40MEt_qD3itOxCcs_YdzL0H


Nagios Videos
-------------
https://www.youtube.com/playlist?list=PLUltco2RCw42GG7B27-1m5ku2WsPS8hhn

EC2 Instance Creation by using Terraform - Mithun Technologies - +91-9980923226



Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/

provider "aws" {
  region = "ap-south-1"
  access_key = "AIA4UQE3BUQ6GQ3BAEO"
  secret_key = "5LAzj2tYFxf1NNvmvz0Z1UASoEzDZHlc6R5wHF"
}

resource "aws_instance" "AWSServer" {
  ami = "ami-0a74bfeb190bd404f"
  instance_type = "t2.micro"
  key_name = "mithuntechnologies"
  security_groups = ["launch-wizard-1"]
  tags = {
   Name = "Terrafrom Server"
  }
}

Wednesday, March 4, 2020

Vault Installation - Linux Server- Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Packer Installation 
#Login as a root user in ec2 instance
sudo su -

#You will need to upgrade your system and packages
yum update -y

#Install wget and unzip packages
yum install wget unzip vim -y


#Go to /opt dir
cd /opt

#Download the Vault software.
https://www.vaultproject.io/downloads/

wget https://releases.hashicorp.com/vault/1.3.2/vault_1.3.2_linux_amd64.zip

#Extract the terraform software.
unzip vault_1.3.2_linux_amd64.zip -d /usr/local/bin/

#Check the version

vault -v (OR) vault --version

#Help

vault  -help
 

Tuesday, February 25, 2020

Java Installation - Linux - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Java Installation  in RHEL
#Login as a root user
sudo su -


#Install JRE 1.8
yum install java-1.8.0-openjdk -y
java -version 
#Install JDK 1.8 
yum install java-1.8.0-openjdk-devel -y

javac -version 
#Install JRE 11  
yum install java-11-openjdk -y
java -version 
#Install JDK 11
yum install java-11-openjdk-devel -y
javac -version  

                                                          Java Installation  in Ubuntu
##Login as a root user
sudo su -
       

Monday, February 24, 2020

Packer Installation - Linux Server- Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Packer Installation 
#Login as a root user in ec2 instance
sudo su -

#You will need to upgrade your system and packages
yum update -y

#Install wget and unzip packages
yum install wget unzip vim -y


#Go to /opt dir
cd /opt

#Download the Packer software.
https://packer.io/downloads.html 

wget  https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip

#Extract the terraform software.
unzip packer_1.5.4_linux_amd64.zip -d /usr/local/bin/

#Check the version

packer -v (OR) packer --version

#Help

packer -help

Saturday, February 22, 2020

Steps to create password less ssh between two AWS EC2 instances - Mithun Technologues - +91-9980923226

Steps to create password less ssh between two AWS EC2 instances - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Steps to create password less ssh between two AWS EC2 instances

Pre Requisites

  2 Linux Servers
     Redhat Linux Server - A
     IP:       13.233.128.180
     User:     ec2-user
     Password: ********
   
     Redhat Linux Server - B
     IP:       13.127.64.6
     User:     ec2-user
     Password: ********

Step  1

Generate the ssh key using below command in Redhat Linux Server - A

ssh-keygey
~/.ssh/
id_rsa
id_rsa.pub

Step 2
Copy the public key from Redhat Linux Server - A to Redhat Linux Server - B as follows.

ssh-copy-id ec-user@Redhat Linux Server - B HostName/IP Address


Step 3
Test the configurations as follows.

ssh ec2-user@Redhat Linux Server - B HostName/IP Address

It should not ask the password and It will successfully connected to Redhat Linux Server - B from Redhat Linux Server - A




  

Thursday, February 20, 2020

Terraform Installation - Linux Server- Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Terraform Installation 
#Login as a root user in ec2 instance
sudo su -

#You will need to upgrade your system and packages
yum update -y

#Install wget and unzip packages
yum install wget unzip vim -y

#Download the terraform software.
#Use https://www.terraform.io/downloads.html to download the terraform software.

wget https://releases.hashicorp.com/terraform/1.3.3/terraform_1.3.3_linux_amd64.zip

#Extract the terraform software.
unzip terraform_1.3.3_linux_amd64.zip -d /usr/local/bin/

#Check the version
terraform -v (OR) terraform version

#Help
terraform -help

Wednesday, February 19, 2020

Mongo DB Installation - Linux - Mithun Technologies - 9980923226



Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Mongo DB Installation 
#Login as a root user
sudo su -

#Configure the package management system (yum).
#Create a file /etc/yum.repos.d/mongodb-org-4.2.repo


vi /etc/yum.repos.d/mongodb-enterprise-4.2.repo

#add below lines in /etc/yum.repos.d/mongodb-org-4.2.repo file

[mongodb-enterprise-4.2]
name=MongoDB Enterprise Repository
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/4.2/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc

#Install the mongodb
yum install -y mongodb-enterprise

#Enable the mongod service
systemctl enable mongod
#Start  the mongod service
systemctl start mongod
#Check the mongo db version
mongo --version

#Connect to mongo db
mongo
#Create a user

use admin
 
db.createUser(
  {
    user: "mithuntechnologies",
    pwd: "passw0rd",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
  }
)

#Enable authentication

vi /etc/mongod.conf

security:
    authorization: "enabled"
   
#Restart the mongod service as follows.

service mongod restart

# Connect to Mongo DB from any client
mongo mongod:IPAddress:27017


Tuesday, February 11, 2020

Install Git in AWS - EC2 Instance - Mithun Technologies - +91 - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/
##Login as a root user
sudo su -

##Change dir to /opt
cd /opt
##The below command will download and install all required development libraries to your system.

yum groupinstall "Development Tools" -y

yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel curl-devel -y
yum install wget tar -y

##Open below URL and select the specific version and right click on that and click on Copy Link ##Address, then execute the wget command.
##https://github.com/git/git/releases

wget https://github.com/git/git/archive/v2.18.0.tar.gz -O git-bash.tar.gz
tar -zxf git-bash.tar.gz

cd git-2.18.0
make configure
./configure --prefix=/usr/local
##make install command will copy the built program, and its libraries and documentation, to the correct locations.
make install

git --version

git config --global user.name "Mithun Technologies"
git config --global user.email "devopstrainingblr@gmail.com"
git config --list


Sunday, January 19, 2020

Install Apache HTTP Server in Linux Redhat Server - Mithun Technologies - 9980923226



Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/
Install Apache HTTP Server Installation 
 Login as root user and execute the below command for install http server.

yum install httpd -y

Enable the service as follows.

systemctl enable httpd.service

Start the HTTP server as follows.

systemctl start httpd.service

Important Points
  1.  httpd.conf file is the configuration file for Apache HTTP server, which is available in /etc/httpd/conf directory.
  2. Logs will be available in /etc/httpd/logs directory.

Thursday, January 16, 2020

Install Docker in Linux Server - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/
 
In Ubuntu Server
----------------------
Method-1
=======

Step 1: Update all Software Repositories using below command.

#sudo apt-get update

Step 2: Install a Docker using below command

#sudo apt install docker.io -y

Step 3: Enable and start the docker service as follows.

#sudo systemctl enable docker
#sudo systemctl start docker

Step 4: Check the  docker version

#docker --version

# You will get permison denied error as regular user dosn't have permisions to execute docker commands, add ubuntu user to docker group.

#sudo usermod -aG docker $USER
     or 
#sudo usermod -aG docker ubuntu

# Exit From Current SSH Terminal & SSH(Login) again .Then execute
docker ps

To Un Install a docker
-----------------------------

Use below command to un-install docker
#apt-get remove docker docker-engine docker.io -y
----------------------------------------------------------------------------------------------------------------------------
Method -2
========
Step 1: Update all Software Repositories using below command.
#apt-get update


Step 2: Install Docker using below command
#curl -fsSL get.docker.com | /bin/bash


Step 3: Check all the versions.
#apt-cache madison docker-ce


Step 4: If we want to install the specific version use the below command.
apt-get install docker-ce=<VERSION>

Step 5: If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

#usermod -aG docker  <<YourUser>>
============================================================================

 In Amazon Linux
-----------------------

sudo yum update -y       
sudo yum install docker -y
sudo service docker start

Add Regural user to dockergroup
sudo usermod -aG docker  <username>

ex:
sudo usermod -aG docker ec2-user

Once you add user to group exit from the server and login again.
# Get docker information
docker info

#Install Docker in Linux (Works for most of linux flavors).
sudo curl -fsSL get.docker.com | /bin/bash

Docker Home Directory/Working Dir:
/var/lib/docker

============================================================================
Install Docker on AWS RHEL  (Offcially No Support)
----------------------------------------------------------------------

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce-3:18.09.1-3.el7 -y
sudo systemctl enable docker
sudo systemctl start docker

sudo docker info

# Check docker is installed or not
docker info

# You will get permison denied error as regular user dosn't have permisions to execute docker commands, add user to docker group.

sudo usermod -aG docker $USER
or
sudo usermod -aG docker ec2-user

# Exit From Current SSH Terminal & SSH(Login) again .Then execute
docker ps




Sunday, January 5, 2020

Jenkins Docker Swarm Integration - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 





Jenkins Docker Swarm Integration
=========================

1) CI/CD Pipeline Scrit to build and deploy single service in docker swarm


2) CI/CD Pipeline Scrit to build and deploy multiple services using docker stack(Compose File) in docker swarm


Pre Requisite:
==========

1) Docker Swarm Cluster
  
   https://www.youtube.com/watch?v=cuNW5Qwd-D4
  
2)  Setup CI/CD (Jenkins) Server   

=========Install Java, Jenkins, Docker in Ubuntu==============

sudo apt update -y

sudo apt install openjdk-8-jdk -y

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update -y
sudo apt-get install jenkins -y

sudo systemctl status jenkins

sudo curl -fsSL get.docker.com | /bin/bash

# Add jenkins user to docker group
sudo usermod -aG docker jenkins
# Restart jenkins to reflect docker permisions
sudo systemctl restart jenkins

# Use below commands if you want to switch to jenkins user.
sudo -i -u jenkins
sudo su -s /bin/bash jenkins

##Plugins Used
sshAgent

Monday, November 18, 2019

Kubernetes Setup Using Kubeadm In AWS EC2 Ubuntu Servers - Mithun Technologies - +91-9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

Agenda: Kubernetes Setup Using Kubeadm In AWS EC2 Ubuntu Servers
=======================================================


Prerequisite:
==========


3 - Ubuntu Serves

1 - Manager  (4GB RAM , 2 Core) t2.medium

2 - Workers  (1 GB, 1 Core)     t2.micro


Note: Open Required Ports In AWS Security Groups. For now we will open All trafic.

==========COMMON FOR MASTER & SLAVES START ====

# First, login as ‘root’ user because the following set of commands need to be executed with ‘sudo’ permissions.

sudo su -

# Install Required packages and apt keys.

apt-get update -y
apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update -y



#Turn Off Swap Space

swapoff -a
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab

# Install And Enable Docker

apt install docker.io -y
usermod -aG docker ubuntu
systemctl restart docker
systemctl enable docker.service


#Install kubeadm, Kubelet And Kubectl

apt-get install -y kubelet kubeadm kubectl kubernetes-cni

# Enable and start kubelet service

systemctl daemon-reload
systemctl start kubelet
systemctl enable kubelet.service

==========COMMON FOR MASTER & SLAVES END=====



===========In Master Node Start====================
# Steps Only For Kubernetes Master

# Switch to the root user.

sudo su -

# Initialize Kubernates master by executing below commond.

kubeadm init

#exit root user & exeucte as normal user

exit

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config


# To verify, if kubectl is working or not, run the following command.

kubectl get pods -o wide --all-namespaces

#You will notice from the previous command, that all the pods are running except one: ‘kube-dns’. For resolving this we will install a # pod network. To install the weave pod network, run the following command:

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

kubectl get nodes

kubectl get pods --all-namespaces


# Get token

kubeadm token create --print-join-command

=========In Master Node End====================


Add Worker Machines to Kubernates Master
=========================================

Copy kubeadm join token from and execute in Worker Nodes to join to cluster



kubectl commonds has to be executed in master machine.

Check Nodes
=============

kubectl get nodes


Deploy Sample Application
==========================

kubectl run nginx-demo --image=nginx --port=80

kubectl expose deployment nginx-demo --port=80 --type=NodePort


Get Node Port details
=====================
kubectl get services

Saturday, October 26, 2019

Jenkins installation in Linux Server - Mithun Technologies - +91-9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

Login as a root user
sudo su -

Install Jenkins

cd /opt/

wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

yum install jenkins -y

Enable and start the jenkins service

systemctl enable jenkins

systemctl start jenkins








Wednesday, October 23, 2019

Install Maven Build Tool in Linux Server - Mithun Technologies - +919980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/

Install Maven Build Tool in Linux Server/ Set Class path for Maven Build Tool in Linux Server
-------------------------------------------------------------------------------------------------------------------------

Pre Requisite Software
-----------------------------
Java (JDK) is the Pre - Requisite Software for Maven.

javac -version

Install Maven
------------------

Step1) Login as a root user and change the directory to /opt/

sudo su -
cd /opt/
yum install wget unzip -y

Step2) Download the Maven Software

wget https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip
unzip apache-maven-3.9.5-bin.zip

Step3) Set the class path/Environmental Variable

For Specific User
----------------------
vi ~/.bash_profile

export M2_HOME=/opt/apache-maven-3.9.5

export PATH=$PATH:$M2_HOME/bin

source ~/.bash_profile

For All Users
---------------------- 
vi /etc/profile
export M2_HOME=/apache-maven-3.9.5
export PATH=$PATH:$M2_HOME/bin

source /etc/profile

Step4) Check the Maven version

mvn -version


Tuesday, October 22, 2019

AWS Password Login - Configuration - Mithun Technologies +91-9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 



Enable a password login instead of pem file when logging into EC2 Instance using SSH
================================================================


Procedure to Enable the password login
---------------------------------------------------

Step 1) First login into ec2 instance with pem file, then switch to root user.
ssh -i "mithuntechnologies.pem" ec2-user@ec2-52-66-196-244.ap-south-1.compute.amazonaws.com

sudo su - (OR) sudo -i

Step 2) Set a password for ec2-user as follows.
       
passwd ec2-user
       
Step 3) Update the PasswordAuthentication parameter in the /etc/ssh/sshd_config file as follows.
       
vi /etc/ssh/sshd_config
       
PasswordAuthentication yes

Step 4) Restart the sshd service as follows.

service sshd restart


Nexus Server Installation in Linux - Mithun Technologies - +91-9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

Login as a root user
sudo su -
cd /opt
yum install tar wget -y
wget http://download.sonatype.com/nexus/3/nexus-3.15.2-01-unix.tar.gz
tar -zxvf nexus-3.15.2-01-unix.tar.gz
mv /opt/nexus-3.15.2-01 /opt/nexus

#As a good security practice, Nexus is not advised to run nexus service as a root user, so create a new user called nexus and grant sudo access to manage nexus services as follows.
 

useradd nexus

#Give the sudo access to nexus user

visudo
nexus ALL=(ALL) NOPASSWD: ALL

#Change the owner and group permissions to /opt/nexus and /opt/sonatype-work directories.

chown -R nexus:nexus /opt/nexus
chown -R nexus:nexus /opt/sonatype-work
chmod -R 775 /opt/nexus
chmod -R 775 /opt/sonatype-work

#Open /opt/nexus/bin/nexus.rc file and  uncomment run_as_user parameter and set as nexus user.

vi /opt/nexus/bin/nexus.rc
run_as_user="nexus"

#Create nexus as a service

ln -s /opt/nexus/bin/nexus /etc/init.d/nexus

#Switch as a nexus user and start the nexus service as follows.

sudo su - nexus

#Enable the nexus services
sudo systemctl enable nexus

#Start the nexus service
sudo systemctl start nexus

#Access the Nexus server from Laptop/Desktop browser.
 
http://IPAddess/Hostname:8081/

#Default Credentials
User Name:
Password:

Troubleshooting
---------------------

nexus service is not starting?

a)make sure need to change the ownership and group to /opt/nexus and /opt/sonatype-work directories and permissions (775) for nexus user.
b)make sure you are trying to start nexus service with nexus user.
c)check java is installed or not using java -version command.
d) check the nexus.log file which is availabe in  /opt/sonatype-work/nexus3/log  directory.

Unable to access nexus URL?
-------------------------------------

a)make sure port 8081 is opened in security groups in AWS ec2 instance.

Configuration of NFS Server - Mithun Technologies - +91-9980923226

   Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/

                                                          Configuration of NFS Server

Step 1: Install NFS Kernel Server
Before installing the NFS Kernel server, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

$ sudo apt-get update

The above command lets us install the latest available version of a software through the Ubuntu repositories.

Now, run the following command in order to install the NFS Kernel Server on your system:

$ sudo apt install nfs-kernel-server


Step 2: Create the Export Directory

sudo mkdir -p /mnt/share/

# As we want all clients to access the directory, we will remove restrictive permissions.
sudo chown nobody:nogroup /mnt/share/
sudo chmod 777 /mnt/share/

Step 3: Assign server access to client(s) through NFS export file

sudo vi /etc/exports


#/mnt/share/ <clientIP or Clients CIDR>(rw,sync,no_subtree_check,no_root_squash)
 #Ex:
/mnt/share/ *(rw,sync,no_subtree_check,no_root_squash)


Step 4: Export the shared directory

$ sudo exportfs -a


sudo systemctl restart nfs-kernel-server

Step 5: Open firewall for the client (s) PORT 2049


Configuring the Client Machine


Step 1: Install NFS Common
Before installing the NFS Common application, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

$ sudo apt-get update


$ sudo apt-get install nfs-common


# Test if we can mount nfs path with client systems folder.

Step 2: Create a mount point for the NFS host’s shared folder

sudo mkdir -p /mnt/sharedfolder_client

Step 3: Mount the shared directory on the client

sudo mount serverIP:/mnt/share/ /mnt/mountfolder_client

Thursday, October 17, 2019

Install Maven Build Tool in MAC - Mithun Technologies - +919980923226


             Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

Install Maven Build Tool in MAC Book / Set Class path for Maven Build Tool in MAC Book
---------------------------------------------------------------------------------------------------------------------

Pre Requisite Software
-----------------------------
Java is the Pre Requisite Software for Maven.

java -version


Install Maven
------------------

Download the Maven Software using below url.
https://maven.apache.org/download.cgi

Set the class path/Environmental Variable
vi ~/.bash_profile

export M2_HOME=/Users/mithunreddy/MithunTechnologies/Softwares/Running/apache-maven-3.6.2

export PATH=$PATH:$M2_HOME/bin

source ~/.bash_profile

Check the Maven version

mvn -version

Thursday, October 3, 2019

Docker Swarm Setup - Mithun technologies +91-9980923226


             Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

                                                        Docker Swarm Setup
                                                       ================

Rerequisites:
============

3 - Ubuntu Servers
     1 - Master
    2 - Workers
   
Steps:
======
         
1) Install Docker Community Edition in all the 3 Servers.
   And add user(ubuntu) to docker group.
                
   # Below command works for most of the Linux flavors except Redhat Linux
   sudo curl -fsSL get.docker.com | /bin/bash
  
   # Add Current User to docker group.
   sudo usermod -aG docker ${USER}
  
2) Open below ports in AWS Security Groups.
      
    TCP port 2377 for cluster management communications
    TCP and UDP port 7946 for communication among nodes
    UDP port 4789 for overlay network traffic.
   
    If you are planning on creating an overlay network with encryption     (--opt encrypted), you will  also need     to ensure ip protocol 50 (ESP) traffic is allowed.
     
3) Execute below command to initiate docker swarm manager in one system.
  
   # Initialize docker swarm cluster.
   docker swarm init
  
   # Get worker token
   docker swarm join-token worker
  
   # Get manager token to add another node as secondary manager
   docker swarm join-token manager
  
4) Add workers machines to cluster.
   #Execute join token(worker token from manager) in all worker machines.
  
  
5) Display docker cluster nodes in manager machine.

   docker node ls
  
6) Deploy Sample Docker Application in docker swarm cluster.

    docker service create --name webserver --replicas 2 -p 80:80 httpd     
  

Monday, September 30, 2019

SonarQube Server Integration with Jenkins Mithun Technologies - +919980923226



             Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

Pre Requisite:

SonarQuber Server
Jenkins Server

Step 1) Install "SonarQube Scanner"  plugin in Jenkins as follow.

 
Step 2) Integrate SonarQube server with Jenkins  as follows.


Manage Jenkins ---> Configure System ---> SonarQube servers



Generate the SonarQube server authentication token 
 
Login into SonarQube with Admin user.
Default Credentials:
User: admin
Password: admin

Click on Administration tab.




Click on Tokens





Step3) Execute the SonarQube report for Maven Java Project.

Select the job , to which we need to run the sonarqube report, click on configure, in Post-build Actions options, click on Add post-build action --> Select the SonarQube report for Maven project.






Monday, September 16, 2019

Install Ansible in AWS EC2 Redhat Server - Mithun Technologoes +91-9980923226

 

 
  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Ansible Installation

1) Create RedHat 3 Servers (1-AnsibleServer , 2- Host Machines for demo) in AWS.
 

2) Login As a root user and create ansible user and provide sudo access in all Servers.

    2.1) Create the user ansible and set the password on all hosts:
           sudo useradd ansible
           sudo passwd ansible
     
    2.2) Make the necessary entry in sudoers file /etc/sudoersfor ansible        
           user for password-less sudo access:
          
           visudo

           ansible ALL=(ALL) NOPASSWD: ALL

       

    2.3) Make the necessary changes  in sshd_config file /etc/ssh/sshd_config    
           to enable password based authentication.

         Un comment PasswordAuthentication yes
         and comment  PasswordAuthentication no.
         And save the file .

            vi /etc/ssh/sshd_config

     2.4)    Then restart sshd service.
                sudo service sshd restart

=============================================================================
               Install Ansible in Red hat (Ansible Server)
=============================================================================

1)     SSH to Redhat System & Switch to ansible user
       sudo su - ansible
      
2)     Install python
       sudo yum install python3 -y
      
3)    Update python alaternatives
       sudo alternatives --set python /usr/bin/python3
      
4)    Verify Python Version
         python --version
 
5)    Install ansible using Yum 
sudo yum -y install ansible
      
6)    Verify Ansible version
       ansible --version
       
=============================================================================
               Generate SSH Key, Copy SSH Key(Ansible Server)
=============================================================================

1)    Now generate SSH key in Ansible Server

sudo su - ansible

ssh-keygen

2)    Copy it to Host  servers as ansible user: 

  Repeat below command by updating HOST IP for all the  HOST Servers. 

          ssh-copy-id ansible@<HostIP>

 

Update Host Inventory in Ansible Server to add host servers’ details.

1)    Add Host Server details

 

vi  /etc/ansible/hosts

 

# Connect using username and password

192.168.1.105 ansible_user=ansible ansible_password=password

 

# Connect using username and pem(Make Sure Have pem file at given path)

172.31.35.23 ansible_user=ec2-user ansible_ssh_private_key_file=~/aws.pem

 

# If ssh keys are copied

172.31.35.23

 

2)    Use ping module to test Ansible and after successful run you can see the below output. 

 

          ansible all -m ping

            172.31.35.23 | SUCCESS => {

            "changed": false,

             "ping": "pong"

             }

 

3)    Install sshpass in Ansible server if you get below error .

 

"to use the 'ssh' connection type with passwords, you must install the sshpass program

$ sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/sshpass-1.06-2.el7.x86_64.rpm

Ansible Installation in Amazon Linux - Mithun Technologies - 9980923226

  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com                                                 ...