Steps to bring up a Jenkins instance on a centOS7 instance
1. Bringup a VM and & Install any linux distro of your preference. In this case, I'm using CentOS7.
2. Install supported
Jenkins v1.624 wget https://updates.jenkins-ci.org/download/war/1.624/jenkins.war.
3. Install Java 7
yum install java-1.7.0-openjdk (https://www.atlantic.net/cloud-hosting/how-to-install-java-jre-jdk-centos-7/)
and configure the OS to use java 1.7 by default
4. Set environment (export
$JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.171-2.6.13.0.el7_4.x86_64"
| sudo tee -a /etc/profile; echo 'export
$JRE_HOME=/usr/lib/jvm/jre/' | tee -a /etc/profile; source /etc/profile)
5. Install Jenkins
(cd ~; java -jar jenkins.war)
6. Configure Jenkins
as a service ( cd /etc/systemd/system; vi jenkins.service and add below lines to it.
[Unit]
Description=Jenkins
Service
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/java
-jar /usr/local/bin/jenkins.war
Restart=on-abort
[Install]
WantedBy=multi-user.target
7. Start the Jenkins
Service (systemctl daemon-reload; systemctl start jenkins.service)
Establishing trust between Jenkins and other applications
Get the certificate of the application (in this case it's named as 'ccm.cer')
- export $JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.171-2.6.13.0.el7_4.x86_64" | sudo tee -a /etc/profile
- echo 'export $JRE_HOME=/usr/lib/jvm/jre/' | tee -a /etc/profile
- source /etc/profile
- echo $JRE_HOME
- echo $JAVA_HOME
- java InstallCert 10.193.180.190
- cp jssecacerts $JAVA_HOME/lib/security
- cp jssecacerts ~/.keystore
- keytool -list -alias 10.193.180.190-1
- Cd /usr/lib/jvm/jre-1.8.0-openjdk/lib/security
- keytool -importcert -file /root/ccm.cer -keystore cacerts -alias 10.193.180.190-1
- keytool -list -alias 10.193.180.190-1
- reboot
- systemctl status jenkins.service
- systemctl start jenkins.service
- systemctl status jenkins.service
- java SSLPoke 10.193.180.190 443
No comments:
Post a Comment