Thursday, January 13, 2022

Day 3 - Jenkins Pipeline

day 3 - jenkins

Pre-requisites
1. Install two linux instance
2. 



install tomcat

# vi 


Install Apache Tomcat Server on Ubuntu

1. Update your system
$ sudo apt update

2. Search the tomcat on repo
$ sudo apt-cache search tomcat

3. download and install tomcat server
$ sudo apt install tomcat9 tomcat9-admin

verify
$ ss -ltn  # see if port 8080 is listening

4. Allow port 8080 
$ sudo ufw allow from any to any port 8080 proto tcp

5. Test if tomcat is installed successfully
http://<IP-Addr:8080

You will see "It works!" if installed successfully.

6. Create User

$ sudo vi /etc/tomcat9/tomcat-users.xml

<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
#<user username="tomcat" password="pass"roles="admin-gui,manager-gui"/>
<user username="admin" password="password" roles=roles="admin-gui,manager-gui, manage-scripts" />

7. Start your tomcat
$ sudo systemctl restart tomcat9
$ sudo systemctl enable tomcat9 # to make sure tomcat runs fine upon reboot.

8. Access your tomcat application manager
http://<ip-addr>:8080/manager

it will prompt you for username/pw. Enter the username/password you speficy at the tomcat-users.xml config file.


You are all set..


once you install tomcat, go to your jenkins and go to plugins
search for "deploy to"

add "Deploy to cintainer"

and click on "download and install after restart"




/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64/jre/bin/java

No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...