一、安装
前提:需查看是否安装了JDK
1.第一种方法
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
yum install jenkins
2.第二种方法(本文使用)
wget http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.7.3-1.1.noarch.rpm
rpm -ivh jenkins-2.7.3-1.1.noarch.rpm
3.配置jenkins端口
vim /etc/sysconfig/jenkins
找到修改端口号 JENKINS_PORT="8080" 不冲突可以不做修改
4.配置权限
vim /etc/sysconfig/jenkins
找到修改端口号 JENKINS_USER="jenkins" 改为root
5.修改目录权限
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins
6.重启
service jenkins restart
ps -ef | grep jenkins
7.启动
systemctl start jenkins
二、访问
1.访问jenkins地址 http:<ip或者域名>:8080
2.查看密码
cat /var/lib/jenkins/secrets/initialAdminPassword
3.安装插件
to be continued......