mac上搭建jenkins

来源:互联网 发布:apache 压力测试教程 编辑:程序博客网 时间:2024/05/29 06:55

原文:http://www.jayfeng.com/2015/10/22/%E4%BD%BF%E7%94%A8jenkins%E8%87%AA%E5%8A%A8%E5%8C%96%E6%9E%84%E5%BB%BAandroid%E5%92%8Cios%E5%BA%94%E7%94%A8/

安装Jenkins

官网地址:http://jenkins-ci.org/

1234
// 使用brew安装brew install jenkins// 启动,直接运行jenkins即可启动服务jenkins

默认访问http://localhost:8080/, 可进入jenkins配置页面。


安装过程中常见问题:

执行安装命令时提示:jenkins: Java 1.7+ is required to install this formula


原因:当前安装jdk版本过低,应>1.7+,mac电脑默认的jdk版本是1.6,故需升级jdk

升级步骤:

1、查看当前jdk版本

You can determine which version of the JDK is the default by typing java -version in a Terminal window. If the installed version is 7u6, you will see a string that includes the text 1.7.0_06. For example:

    % java -version    java version "1.7.0_06-ea"    Java(TM) SE Runtime Environment (build 1.7.0_06-ea-b13)    Java HotSpot(TM) 64-Bit Server VM (build 23.2-b04, mixed mode)

To run a different version of Java, either specify the full path, or use the java_home tool:

    /usr/libexec/java_home -v 1.7.0_06 --exec javac -version

2、从官网上下载最新版本的jdk,官网地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

3、安装成功后删除,系统默认的jdk

Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format:*

    /Library/Java/JavaVirtualMachines/jdk<major>.<minor>.<macro[_update]>.jdk

For example, to uninstall 7u6:

    % rm -rf jdk1.7.0_06.jdk

详见:http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html







0 0
原创粉丝点击