修改Ubuntu下的jenkins端口号(2)

# Verify that the jenkins port is not already in use, winstone does not exit                                                                                                                                   
    # even for BindException                                                                                                                                                                                       
    check_tcp_port "http" "$HTTP_PORT" "8082" || return 1

# If the var MAXOPENFILES is enabled in /etc/default/jenkins then set the max open files to the                                                                                                                 
    # proper value                                                                                                                                                                                                 
    if [ -n "$MAXOPENFILES" ]; then
        [ "$VERBOSE" != no ] && echo Setting up max open files limit to $MAXOPENFILES
        ulimit -n $MAXOPENFILES
    fi

# --user in daemon doesn't prepare environment variables like HOME, USER, LOGNAME or USERNAME,                                                                                                                 
    # so we let su do so for us now                                                                                                                                                                                 
    $SU -l $JENKINS_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- $Java $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS" || return 2
}

2.修改/etc/default/jenkins文件,将端口8080改成8082

然后重新启动jenkins, 检查一下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/19707.html