Jenkins installation and configuration
Here is step by step detail of Jenkins installation and configuration along with screen shot.
Here is step by step detail of Jenkins installation and configuration along with screen shot.
Step:Install repo
yum -y install epel-release
Step:Install java
# yum install java-1.8.0-openjdk
Step check java
[root@localhost ~]# java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
Step:Start by importing the repository key from Jenkins
[root@localhost ~]# rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
Step:After importing the key, add the repository to the system
[root@localhost ~]# yum -y install wget
[root@localhost ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
output.
--2019-09-21 10:21:59-- http://pkg.jenkins-ci.org/redhat/jenkins.repo
Resolving pkg.jenkins-ci.org (pkg.jenkins-ci.org)... 52.202.51.185
Connecting to pkg.jenkins-ci.org (pkg.jenkins-ci.org)|52.202.51.185|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71
Saving to: ‘/etc/yum.repos.d/jenkins.repo’
100%[============================================================================================================>] 71 --.-K/s in 0s
2019-09-21 10:22:00 (4.99 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [71/71]
Step
[root@localhost ~]# yum -y install jenkins
[root@localhost ~]# systemctl start jenkins
[root@localhost ~]# systemctl enable --now jenkins
Step:Enable port
8080/tcp
on the firewall
[root@localhost ~]# firewall-cmd --add-port=8080/tcp --permanent
[root@localhost ~]# firewall-cmd --reload
[root@localhost ~]# firewall-cmd --list-all
[root@localhost ~]# ss -tunelp | grep 8080
output
[root@localhost ~]# ss -tunelp | grep 8080
tcp LISTEN 0 50 :::8080 :::* users:(("java",pid=13674,fd=159)) uid:987 ino:55044 sk:ffffa0ca7ac318c0 v6only:0 <->
Step:Unlock
[root@localhost ~]# cd /var/lib/jenkins/
[root@localhost jenkins]# cd secrets/
[root@localhost secrets]# ls
[root@localhost secrets]# vim initialAdminPassword
Copy the password and paste on password index
output:
Step click on install suggested plugin.
output
It will take some time after that
Step:create an admin user account used to manage the Jenkins server.
Then it will appear url page
Save and Finish.
Start using Jenkins.
Now we can use Jenkins,we can use git and local repository as well
I am going to create my first project in Jenkins,for that i have create java hello world.
$ mkdir java-application
$cd java-application/
~/java-application$ sudo vim hello world.java
Copy the hello world code from google and paste
Then compile.
~/java-application$ javac helloworld.java
Create job
Click on create Job in Jenkins
I am going to create my first project in Jenkins,for that i have create java hello world.
$ mkdir java-application
$cd java-application/
~/java-application$ sudo vim hello world.java
Copy the hello world code from google and paste
Then compile.
~/java-application$ javac helloworld.java
Create job
Click on create Job in Jenkins
"Then enter hello world on enter an item name here" and select free style project.
Then Click on ok
In new window provide description like run and build java
I will not choose any below option and move to next configuration"source code management"
and chose none
Then Click on ok
In new window provide description like run and build java
I will not choose any below option and move to next configuration"source code management"
and chose none
Comments
Post a Comment