Write us what you want & improve the DevOpsCloud website for easy to use.

To stop spammers/bots in Telegram, we have added a captcha while joining the Telegram group, which means every new member, has to authenticate within 60 seconds while joining the group.

Home >>All Articles

Published Articles (117)

Sort by:
  • All |
  • AWS (52) | 
  • Azure (31) | 
  • DevOps (9) | 
  • FREE Udemy Courses (6) | 
  • GCP (1) | 
  • Linux (1) | 

You are viewing the Articles/Questions in DevOps category

AVR posted:
2 years ago
How to install Jenkins on AWS EC2 Linux Machine?
Go to AWS
Launch an Instance
Name-Provide a name
OS Image- I pick Red Hat Linux OS
Instance type - t2.micro for learning purposes only
Key paid - Yes, we need it
Security Group - Yes, we need it as Mandatory
SSH 22 should open
Custom TCP 8080 should also open for Jenkins
Launch the Instance and wait patiently to see the Instance state as Running
Connect to EC2 Machine using an SSH client
Pick the ssh command provided by the AWS
Open Git Bash -
Go to the location where pem file is downloaded
cd downloads
paste the ssh command and get connected to EC2 Red Hat Linux machine
$ says we are logged in with a normal user
sudo -i
Now we can see # as the user is the root user

Let's install java as a part of the Tomcat installation
yum install wget zip unzip -y
JDK 8u131 is the version which has been tested at my end.
stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
We have downloaded jdk-8u131-linux-x64.rpm
Once it is downloaded, use ls command
ls
rpm -ivh jdk-8u131-linux-x64.rpm
java -version
wget dlcdn.apache.org/tomcat/tomcat-8/v8.5.83/bin/apache-tomcat-8.5.83.zip
Once it is downloaded, use ls command
ls
unzip apache-tomcat-8.5.83.zip
ls
mv apache-tomcat-8.5.83 /opt/tomcat
ls
How to start the Tomcat server?
chmod -R 755 /opt/tomcat (Here we are granting appropriate file permissions) Here, R is Recursive, and 755 permissions are meant for users, groups and others.
7 means 4+2+!(Read+Write+Execute)
/opt/tomcat/bin/startup.sh
This should start the Tomcat server as expected
Now we can go to the browser and test the Tomcat page
Go to the browser and type EC2PUBLICIP:8080
We should get the Tomcat landing page as expected.
If we don't get the tomcat page, we need to ensure port no 8080 is open in the ec2 machine security settings.
Click on the active security group.
Click on edit inbound rules
Click on Add rule
Custom TCP should be Type, and Port No should be 8080
We must save the rules


How to check the status of Tomcat?
sudo -i
ps -ef | grep tomcat
grep stands for Global regular expression print
Once the Tomcat is up and running, it shows all the default configuration files
How to stop the Tomcat?
/opt/tomcat/bin/shutdown.sh
ps -ef | grep tomcat
Now we don't see any default configuration files as we stopped the tomcat
Let's start the tomcat server
/opt/tomcat/bin/startup.sh
ps -ef | grep tomcat


How to deploy (jenkins.war) in Tomcat?
updates.jenkins.io/download/war/
Never use new versions and always go with older versions
Let's pick 2.354 version for the time being
updates.jenkins.io/download/war/2.354/jenkins.war (This is the original link)
wget updates.jenkins.io/download/war/2.369/jenkins.war
ls
cp jenkins.war /opt/tomcat/webapps/
Now go to the browser and type EC2PUBLICIP:8080/jenkins
If we see any problems, stop the tomcat and start the tomcat server
/opt/tomcat/bin/shutdown.sh
/opt/tomcat/bin/startup.sh
If the Jenkins war version is not working, we can delete
cd /opt/tomcat/webapps/
ls
rm -rf jenkins jenkins.war (Here we are deleting both files jenkins and jenkins.war)
ls
We need to unlock Jenkins with initialAdminPassword
Go to Terminal
and use the below command
cat /root/.jenkins/secrets/initialAdminPassword
Copy the password and paste it at Jenkins landing page to Unlock
Click on continue
Click on Install suggested plugins(Here we are customizing Jenkins)
Now the question is, why do we need plugins?
To work Ansible/Docker/Kubernetes/Terraform, we should have appropriate plugins in Jenkins for integration purposes which makes the work easier.
We need plugins to configure the connectivity
Create First Admin User
Click on Start using Jenkins
Now we can see Jenkins Dashboard
As an example
Click on New Item
Enter an item name
We can see many options as Freestyle project/Pipeline/Multi configuration project.
Let's select the Freestyle project
Go to Build - Add build step - Execute shell
In the command box, we can simply give the date as a keyword
Click on Apply and Save
Click on Build Now on Left Menu
Left side, click on the tick mark, which shows the Console Output
We can also check the build in the Gitbash terminal
ls -ltra
cd .jenkins
ls
cd workspace
ls
Here we can see the project name
If we build any related package, we can see more details here.
View replies (0)
Posted in: DevOps | ID: Q102 | October 31, 2022, 02:28 AM | 0 Replies
AVR posted:
2 years ago
What do you know about web servers and application servers?
Examples of web servers are Nginx or apache.
Examples of Application servers are Tomcat/Weblogic/Websphere.
What is the difference between a web server and an application server?
a webserver is nothing but a static one with read-only content




How to install nginx web servers?
We need to execute the below commands
sudo -i
yum install nginx -y
systemctl enable nginx
systemctl start nginx
systemctl status nginx
It should be active and running
Go to browser and type EC2PUBLICIP or EC2PUBLICIP:80(Browser default port no is 80, so we don't need to give 80 port any intentionally)
We should get nginx landing page
systemctl stop nginx
Now the nginx landing page should not work as expected.





How to install apache web servers?
We need to execute the below commands
sudo -i
yum install httpd -y
systemctl enable httpd
systemctl start httpd
Here we need to make sure that only either nginx or apache is running on port no 80 as both cannot run at a time with the same port no
If nginx is running on port no 80, we need to stop nginx 1st and then start the apache web server
systemctl status httpd
It should be active and running
Go to browser and type EC2PUBLICIP or EC2PUBLICIP:80(Browser default port no is 80, so we don't need to give 80 port any intentionally)
We should get apache landing page
systemctl stop httpd
Now the apache landing page should not work as expected.




How to install the tomcat application server?
To install tomcat, the pre-requisite is java
1st we need to install java as mandatory
yum install wget zip unzip -y
JDK 8u131 is the version which has been tested at my end.
stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
We have downloaded jdk-8u131-linux-x64.rpm
Once it is downloaded, use ls command
ls
rpm -ivh jdk-8u131-linux-x64.rpm
java -version
wget dlcdn.apache.org/tomcat/tomcat-8/v8.5.83/bin/apache-tomcat-8.5.83.zip
Once it is downloaded, use ls command
ls
unzip apache-tomcat-8.5.83.zip
ls
mv apache-tomcat-8.5.83 /opt/tomcat
ls
How to start the Tomcat server?
chmod -R 755 /opt/tomcat (Here we are granting appropriate file permissions)
/opt/tomcat/bin/startup.sh
This should start the Tomcat server as expected
Now we can go to the browser and test the Tomcat page
Go to the browser and type EC2PUBLICIP :8080
We should get the Tomcat landing page as expected
If we don't get the tomcat page, we need to ensure port no 8080 is open in the ec2 machine security settings.
Click on the active security group.
Click on edit inbound rules
Click on Add rule
Custom TCP should be Type, and Port No should be 8080
We must save the rules
View replies (0)
Posted in: DevOps | ID: Q101 | October 30, 2022, 05:05 AM | 0 Replies
Chandram posted:
3 years ago
Good resources for developing jenkins deployment files
View replies (0)
Posted in: DevOps | ID: Q65 | August 20, 2021, 04:29 PM | 0 Replies
Harishrao posted:
3 years ago
What is the difference between base image and Dockerfile image. Can I run Application with base image
View replies (0)
Posted in: DevOps | ID: Q64 | August 15, 2021, 04:17 PM | 0 Replies
Vikas posted:
3 years ago
I want to learn devops with AWS or gcp
Or azure may be
View replies (0)
Posted in: DevOps | ID: Q44 | July 25, 2021, 07:27 AM | 0 Replies
AVR posted:
3 years ago
What are the advantages of DevOps?
1. Ensure faster deployment
2. Stabilize work environment
3. Significant improvement in product quality
4. Automation in repetitive tasks leaves more room for innovation
5. Promotes agility in your business
6. Continuous delivery of software
7. Fast and reliable problem-solving techniques
8. Transparency leads to high productivity
9. Minimal cost of production



What Makes DevOps a Success?
1. Continuous integrated operation
2. Constant delivery
3. Consistent and constant communication among different teams
4. Less manual management of infrastructure
5. Code for policy management
6. Configuration Management
View replies (0)
Posted in: DevOps | ID: Q15 | June 24, 2021, 07:39 PM | 0 Replies
Rahul posted:
3 years ago
I am Looking For Job Oriented Project in DevOps for the Fresher
Posted in: DevOps | ID: Q13 | June 14, 2021, 11:34 AM | 1 Replies
Ayaz posted:
3 years ago
I want devops material
View replies (0)
Posted in: DevOps | ID: Q5 | June 08, 2021, 07:36 AM | 0 Replies
AVR posted:
3 years ago
What is DevOps?

DevOps is an innovative method for building and delivering quality software.

DevOps is a combination of Dev+Ops where Dev stands for Development & Ops stands for Operations.

DevOps is all about bringing development and operations activities together.

Implementing DevOps is not just about tools; it is also about how people work and the processes they use.

DevSecOps is nothing but collaboration with security.

Automation is a key best practice of organizations that use a DevOps model.


How can we benefit from DevOps?
Stability/Quality & Reliability
Security
Speed
Collaboration
Innovation
Agility
Costs Reduction
Customer satisfaction
View replies (0)
Posted in: DevOps | ID: Q1 | June 05, 2021, 01:09 PM | 0 Replies