一、centos7搭建jdk1.8
1、yum方式安装
#安装jdk1.8
yum install java-1.8.0-openjdk
#安装jdk11
yum install java-11-openjdk
2、解压缩包方式安装
(1) 去Oracle官网下载需要安装的jdk 版本, 并上传到服务器。官网网址:
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
二、centos7安装jenkins
yum方式安装
1.下载依赖
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
2.导入秘钥
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
3.安装
yum install jenkins
修改jenkins的系统用户
#打开jenkins配置文件:
vim /etc/sysconfig/jenkins
#找到如下行:
#将原来的jenkins用户修改为 root用户。
$JENKINS_USER="root"
#修改Jenkins相关文件夹用户权限
#更改jenkins三个文件夹的用户所有都和用户组:
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins
标签:常用,安装,centos7,yum,io,jenkins,root,搭建 From: https://www.cnblogs.com/chuanghongmeng/p/16875618.html