Jenkins - macOS 上安装

文章目录

    • [关于 Jenkins](#关于 Jenkins)
      • [macOS 上安装 Jenkins](#macOS 上安装 Jenkins)
      • 方式一:brew
      • [方式二:tomcat + Jenkins war](#方式二:tomcat + Jenkins war)

关于 Jenkins

官网上下载Jenkins并将其安装到持续集成服务器

https://jenkins.io/download/


macOS 上安装 Jenkins

现在本 macOS 上测试
https://www.jenkins.io/download/lts/macos/


方式一:brew

shell 复制代码
# Install the latest LTS version: 
brew install jenkins-lts

# Install a specific LTS version: 
brew install jenkins-lts@YOUR_VERSION

# Start the Jenkins service: 
brew services start jenkins-lts

# Restart the Jenkins service: 
brew services restart jenkins-lts

# Update the Jenkins version: 
brew upgrade jenkins-lts

方式二:tomcat + Jenkins war

1、下载 tomcat
https://tomcat.apache.org


这里我下载 Tomcat10, binary distributions 中的 Core zip


2、启动 tomcat

将压缩文件解压到:/Users/shushu/software/apache-tomcat-10.0.18

shell 复制代码
$ cd /Users/shushu/software/apache-tomcat-10.0.18

$ sudo sh startup.sh 
Using CATALINA_BASE:   /Users/shushu/software/apache-tomcat-10.0.18
Using CATALINA_HOME:   /Users/shushu/software/apache-tomcat-10.0.18
Using CATALINA_TMPDIR: /Users/shushu/software/apache-tomcat-10.0.18/temp
Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home
Using CLASSPATH:       /Users/shushu/software/apache-tomcat-10.0.18/bin/bootstrap.jar:/Users/shushu/software/apache-tomcat-10.0.18/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Tomcat started.

浏览器中输入 http://localhost:8080 ,如下代表启动成功


关闭tomcat服务命令

shell 复制代码
$ sh shutdown.sh

如果报一下错误

shell 复制代码
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program

原因是权限不够,对这个文件夹的sh文件 赋予权限即可。

shell 复制代码
$ chmod 777 *.sh

3、下载 Jenkins war 包
https://www.jenkins.io/download/


相关推荐
暖核13 分钟前
多容器部署利器,详解 Docker Compose 核心配置与命令
运维
青峰客29 分钟前
DeepSeek 大模型新手快速上手指南
运维·服务器·github
小马同学-35 分钟前
03 容器网络
运维·云计算
qq_349447951 小时前
Ubuntu26安装jenkins
jenkins
程序员-Benothing1 小时前
Linux查找文件命令:find、locate、which、whereis实战
linux·运维·服务器
蓝天星空1 小时前
Jenkins项目矩阵授权配置
jenkins
团子股股东峥哥1 小时前
day39-RHEL-访问网络附加存储
linux·运维·服务器
名字还没想好☜1 小时前
Kubernetes 用 kubectl port-forward 和 proxy 调试集群内服务:两者区别、断连自动重连与为什么别用在生产
运维·docker·kubernetes
程序员-Benothing3 小时前
Linux文件查看与编辑:cat、less、tail、vim快速入门
linux·运维·服务器
考虑考虑9 小时前
docker compose V2版本新属性
运维·后端·自动化运维