Jenkins – Installing and Configuring Jenkins
How to Install JAVA 8 on CentOS/RHEL 7/6 and Fedora:
Step 1 – Download Latest Java Archive
Download latest Java SE Development Kit 8 release from its official download page or use following commands to download from shell.
cd /opt/ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz" tar xzf jdk-8u151-linux-x64.tar.gz
Step 2 – Install Java 8 with Alternatives
After extracting archive file use alternatives command to install it. alternatives command is available in chkconfig package.
cd /opt/jdk1.8.0_151/ alternatives --install /usr/bin/java java /opt/jdk1.8.0_151/bin/java 1 alternatives --config java There are 1 programs which provide 'java'. Selection Command ----------------------------------------------- + 1 /opt/jdk1.8.0_151/bin/java Enter to keep the current selection[+], or type selection number: 1
At this point JAVA 8 has been successfully installed on your system. We also recommend to setup javac and jar commands path using alternatives
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_151/bin/jar 1 alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_151/bin/javac 1 alternatives --set jar /opt/jdk1.8.0_151/bin/jar alternatives --set javac /opt/jdk1.8.0_151/bin/javac
Step 3 – Check Installed Java Version
Check the installed Java version on your system using following command.
java -version java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Step 4 – Setup Java Environment Variables
Most of Java based application’s uses environment variables to work. Set the Java environment variables using following commands
Setup JAVA_HOME, JRE_HOME and PATH environment variables
export JAVA_HOME=/opt/jdk1.8.0_151 export JRE_HOME=/opt/jdk1.8.0_151/jre export PATH=$PATH:/opt/jdk1.8.0_151/bin:/opt/jdk1.8.0_151/jre/bin
Also put all above environment variables in /etc/environment file for auto loading on system boot.
RedHat Linux RPM packages for Jenkins
To use this repository, run the following command:
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
If you’ve previously imported the key from Jenkins, the “rpm –import” will fail because you already have a key. Please ignore that and move on.
You will need to explicitly install a Java runtime environment, because Oracle’s Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM.
- 2.54 (2017-04) and newer: Java 8
- 1.612 (2015-05) and newer: Java 7
With that set up, the Jenkins package can be installed with:
yum install jenkins
About DevOps Training and Certification Course..
This iTOpsTube DevOps popular training course will help you become fully proficient and deploy the DevOps principles and tools in a software enterprise. You will be learning the techniques of successfully integrating the IT development and IT operation departments. This DevOps instructor-led training will help you understand how to communicate, collaborate and automate key processes and systems in order to create synergies for creating faster and better software solutions.
Infra automation tools:
Who should take this DevOps training course?
- IT Developers & IT Operations personnel
- Software automation, testing and security professionals
- DevOps consultants and stakeholders
What are the prerequisites for taking this DevOps training course?
Why should you take this DevOps certification training course?
- Lectures 67
- Quizzes 0
- Duration 50 hours
- Skill level All levels
- Language English
- Students 132
- Assessments Yes
and 129 students enrolled.