centos中yum方式部署Jenkins
第一步:先参考官方文档指导,了解Jenkins所需的依赖java环境,
https://mirrors.jenkins-ci.org/redhat/
#查看是否有jdk17可安装,没有的话,则重现下载ipm
yum search java | grep -i --color jdk
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
yum -y install ./jdk-17_linux-x64_bin.rpm
java -version
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key
yum install fontconfig java-17-openjdk
yum install jenkins
systemctl start jenkins
systemctl status jenkins
vim /usr/lib/systemd/system/jenkins.service #jenkins安装目录,Jenkins配置文件
systemctl daemon-reloa
systemctl restart jenkins
maven下载包地址:
https://archive.apache.org/dist/maven/
https://mirrors.bfsu.edu.cn/apache/maven/