看啥

导航

持续集成环境(1)-Jenkins安装

部署环境

  • centos7 2核4g
  • 关闭防火墙
  • 关闭selinux
  • 关闭NetworkManager
    1)安装JDK
    Jenkins需要依赖JDK,所以先安装JDK1.8
yum install java-1.8.0-openjdk* -y

安装目录为:/usr/lib/jvm
2)获取jenkins安装包

#安装认证Key
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat-stable/jenkins-2.249.1-1.1.noarch.rpm
# rpm -ql jenkins
/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins
/usr/lib/jenkins
/usr/lib/jenkins/jenkins.war
/usr/sbin/rcjenkins
/var/cache/jenkins
/var/lib/jenkins
/var/log/jenkins

3)启动Jenkins

systemctl start jenkins

4)打开浏览器进入链接
http://ip:8080
image
5)获取并输入admin账户密码
cat /var/lib/jenkins/secrets/initialAdminPassword
6)跳过插件安装
因为Jenkins插件需要连接默认官网下载,速度非常慢,而且经过会失败,所以我们暂时先跳过插件安装
image

image
7)添加一个管理员账户,并进入Jenkins后台
image

posted on 2021-08-21 19:39  看啥  阅读(38)  评论(0编辑  收藏  举报