Commands
Commands
1: https://www.puppet.com/docs/puppet/8/install_puppet.html#install_puppet
2: https://www.virtualbox.org/wiki/Downloads
3: https://www.osboxes.org/
4: https://www.puppet.com/docs/puppet/5.5/ssl_regenerate_certificates.html#task-
3367
172.31.46.196
Modify:
vi /etc/hosts
172.31.46.196 puppetmaster.example.com puppet
update: PATH
bash -l
puppetserver -v
Installation of client
[main]
certname = puppetagent1.example.com
server = puppetmaster.example.com
Master:
---------
cd /etc/puppetlabs/code/environments/production/manifests
user { 'test':
ensure => present,
}
Installation of Java
java -version
sudo apt update
sudo apt install openjdk-11-jre
java -version
Debian/Ubuntu
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]
https://pkg.jenkins.io/debian-stable binary/ | sudo tee
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
Start Jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
sudo systemctl enable jenkins
Access Jenkins
http://localhost:8080
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
echo $PATH
https://github.com/discover-devops/JenkinsMaven
Installing TOMCAT
-------------------
========================
Step 2: Install Tomcat
cd /tmp
wget https://downloads.apache.org/tomcat/tomcat-8/v8.5.91/bin/apache-tomcat-
8.5.90.zip.sha512
https://downloads.apache.org/tomcat/tomcat-8/v8.5.91/bin/apache-tomcat-
8.5.91.zip.asc
unzip apache-tomcat-*.zip
sudo mkdir -p /opt/tomcat
sudo mv apache-tomcat-8.5.89 /opt/tomcat/
===========================
Jenkins is running on Port 8080, and tomcat defalut port is also 8080. So we need
to change the Tomcat port:
Let's make the PORT number of TOmcat to 9000
cd /opt/tomcat/apache-tomcat-8.5.89/conf/
vi server.xml file
Search for Connector and change the Port Value, save the file.
===========================
Step 4: Change Permission of Scripts in /bin
cd /opt/tomcat/apache-tomcat-8.5.89/bin
ls -la
sudo chmod +x *
./startup.sh
./shutdown.sh
=========================
cd /opt/tomcat/apache-tomcat-8.5.89/conf
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-script,manager-gui"/>
=====================
Step 6 : Restart the tomcat server
/opt/tomcat/apache-tomcat-8.5.47/bin/shutdown.sh
/opt/tomcat/apache-tomcat-8.5.47/bin/startup.sh
Login Jenkins:
=================
Install Plugins:
Copy Artifact
Deploy to container
/opt/tomcat/apache-tomcat-8.5.90/webapps/manager/META-INF
context.xml
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
/opt/tomcat/apache-tomcat-8.5.47/bin/shutdown.sh
/opt/tomcat/apache-tomcat-8.5.47/bin/startup.sh