# java jdk

sudo yum install jdk1.8

# jenkins install

env: oracle linux 7 , jdk 1.8

# import repo

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

# import key

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

# install jenkins

sudo yum install jenkins

# modify configuration

sudo vi /etc/sysconfig/jenkins

## Type:        integer(0:65535)
## Default:     8080
## ServiceRestart: jenkins
#
# Port Jenkins is listening on.
# Set to -1 to disable
#
JENKINS_PORT="8080"

# start jenkins

sudo systemctl start jenkins

# view status

sudo systemctl status jenkins

# view password

cat /var/lib/jenkins/secrets/initAdminPassword

# jenkins log

By default logs should be made available in /var/log/jenkins/jenkins.log ,if you can't find the initAdminPasswword file ,then you can find the passwork in the log file