Please
follow steps to install Java, Jenkins, Maven, Tomcat on Ubuntu EC2. Jenkins is a java based application, so you need to install Java first.
Java Setup on Ubuntu
sudo apt-get update
Install Java 11
sudo apt-get install default-jdk -y
echo deb http://pkg.jenkins.io/debian- stable binary/ | sudo tee /etc/apt/sources.list.d/jenkin s.list
The above screenshot should confirm that Jenkins is successfully installed.
Access Jenkins in web browser
Now Go to AWS console.
Click on EC2, click on running instances link. Select the checkbox of EC2 you are installing Java and Jenkins.
Change port no from 8080 to 8090
Tomcat default port is also 8080, since we have already used 8080 for Jenkins, we need to change from 8080 to 8090. You can change by modifying server.xml
you need to scroll down by clicking down arrow button in this file change the port no from 8080 to 8090 at line starting with <Connector port="8080" protocol="HTTP/1.1"
Look for the line starting JAVA_OPTS and comment that line by adding #.
Java Setup on Ubuntu
sudo apt-get update
Install Java 11
sudo apt-get install default-jdk -y
Now lets do Jenkins installation
Jenkins Setup
Add Repository key to the system
Add Repository key to the system
wget -q -O - https://pkg.jenkins.io/debian/ jenkins-ci.org.key | sudo apt-key add -
Append debian package repo address to the system
Append debian package repo address to the system
sudo apt-get update
sudo apt-get install jenkins -y
The above screenshot should confirm that Jenkins is successfully installed.
Access Jenkins in web browser
Now Go to AWS console.
Click on EC2, click on running instances link. Select the checkbox of EC2 you are installing Java and Jenkins.
Click on Action.Copy the value from step 4 that says --> Connect to your instance using its Public DNS:
Now go to browser. enter public dns name or public IP address with port no 8080.This is how to select public DNS name:
Unlock Jenkins
You may get screen, enter the below command in Git bash( Ubuntu console)
Also create user name and password.
enter everything as admin. at least user name as admin password as admin
Maven
Maven is a build tool used for building Java applications. Please click here to learn more about Maven. You can install Maven by executing below command:
sudo apt install maven -y
Maven is a build tool used for building Java applications. Please click here to learn more about Maven. You can install Maven by executing below command:
sudo apt install maven -y
Tomcat Installation
Tomcat is a web server or web container where java web application can be deployed by developers. You can learn more about by clicking this URL. Tomcat can be installed by executing below commands:
sudo apt-get update
sudo apt-get install tomcat8 -y
Tomcat is a web server or web container where java web application can be deployed by developers. You can learn more about by clicking this URL. Tomcat can be installed by executing below commands:
sudo apt-get update
sudo apt-get install tomcat8 -y
sudo apt-get install tomcat8-docs tomcat8-examples tomcat8-admin -y
sudo cp -r /usr/share/tomcat8-admin/* /var/lib/tomcat8/webapps/ -v
Click on this link to know how to make changes using Vi editor.
Change port no from 8080 to 8090
Tomcat default port is also 8080, since we have already used 8080 for Jenkins, we need to change from 8080 to 8090. You can change by modifying server.xml
sudo vi /var/lib/tomcat8/conf/server. xml
setup an user in tomcat
sudo vi /var/lib/tomcat8/conf/tomcat- users.xml
sudo vi /var/lib/tomcat8/conf/tomcat-
Scroll down all the way to the end of the file,
Add the below lines in second last line above (above </tomcat-users>)
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="password" roles="manager-gui,manager-script"/>
Add more memory to JVM
sudo vi /etc/default/tomcat8Look for the line starting JAVA_OPTS and comment that line by adding #.
Add the below line:
JAVA_OPTS="-Djava.security. egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC"
JAVA_OPTS="-Djava.security.
sudo systemctl status tomcat8
you may get message that says tomcat is active running.
You should see a page that says.
It works!!!!
That's it. You have setup both Jenkins and Tomcat successfully!!
Please watch here for live demo:
It works!!!!
That's it. You have setup both Jenkins and Tomcat successfully!!
Please watch here for live demo:
Thanks you very much for your simple, knowledgeable info. Please post more.
ReplyDeleteWow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks etcher download
ReplyDeleteThis is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: stop loss
ReplyDeleteThere are numerous kinds of hosting services out there nowadays and everyone declares that they provide the top-quality hosting experience for every demand. In the web hosting market today, we can retrieve dedicated, shared, free (with restrictions) and reseller web hosting. Here, we will study each expression of a reseller web hosting service. This type of hosting is the most streamlined for someone that starts a web corporation. The technical term "Reselling" misses technical meaning or specific set up that would identify it as a hosting type. ssd vps
ReplyDeleteMua vé tại Aivivu, tham khảo
ReplyDeletevé máy bay từ hàn quốc sang việt nam
vé rẻ đi sài gòn
mua vé máy bay đà lạt đi hà nội
vé máy bay đi đà lạt bao nhiêu tiền
lịch bay từ tphcm đi quy nhơn
thuê xe ra sân bay nội bài
It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. https://onohosting.com/
ReplyDeleteI wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. dark web links
ReplyDeleteGreat post, however, I was wanting to know if you could write a little more on this topic? I’d be very grateful if you could elaborate a little bit further. you can check this blog Download Roblox player. I wanted to explain that this software is completely secure and there is no virus or such thing.
ReplyDelete