Jenkins Server
2016-03-13 20:16
302 查看
下载安装
方法一:wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo vim /etc/apt/sources.list& 添加
deb http://pkg.jenkins-ci.org/debian binary/
sudo apt-get update&
sudo apt-get install jenkins
方法二: 下载 后点击安装。
修改默认端口号
修改do_start函数的check_tcp_port命令,端口号从8080换成8081执行命令:
sudo vim /etc/init.d/jenkins
# Function that starts the daemon/service # do_start() { # the default location is /var/run/jenkins/jenkins.pid but the parent directory needs to be created mkdir `dirname $PIDFILE` > /dev/null 2>&1 || true chown $JENKINS_USER `dirname $PIDFILE` # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started $DAEMON $DAEMON_ARGS --running && return 1 # Verify that the jenkins port is not already in use, winstone does not exit # even for BindException check_tcp_port "http" "$HTTP_PORT" "8081" || return 2 # 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 # notify of explicit umask if [ -n "$UMASK" ]; then [ "$VERBOSE" != no ] && echo Setting umask to $UMASK 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 }
修改
/etc/default/jenkins文件,将端口8080改成8081
执行命令:
sudo vim /etc/default/jenkins
# port for HTTP connector (default 8080; disable with -1) HTTP_PORT=8081
重启后台进程, 重启jenkins服务
执行命令:
systemctl daemon-reload&
sudo service jenkins restart
参考链接: Jenkins
相关文章推荐
- linux下如何用命令配置网卡、dns、网关、如何查看网卡状态、如何查看网卡信息。
- 杭电1045 fire net dfs入门
- leetcode:Rotate Image 【Java】
- HBase数据模型
- HBase MapReduce实例分析
- 服务器上装filezilla server后,本地的ftp客户端连接不上去
- HDU 1081:To The Max
- Avalon-作用域绑定
- 登录遇见的小问题
- mycncart 1.4.0.0 新版本发布
- Java遇见HTML——JSP篇之JSP内置对象(上)
- Hello World
- 【设计模式总结篇】
- 在Hadoop上安装Hive
- 兼容全浏览器的本地图片预览
- Redis内存管理(二)
- 本地CS的导出xls代码段
- 【bzoj4197】[Noi2015]寿司晚宴 状压DP
- HDU 1257:最少拦截系统
- stl之序列容器——list