ubuntu部署jenkins

https://www.cnblogs.com/lozz/p/9962316.html

1。安装

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

2.启动

/etc/init.d/jenkins  {start|stop|status|restart|force-reload}

3.修改端口(选做)

修改/etc/init.d/jenkins
do_start函数的check_tcp_port命令,端口号从8080换成xxxx
# Verify that the jenkins port is not already in use, winstone does not exit
# even for BindException
check_tcp_port "http" "$HTTP_PORT" "xxxx" "$HTTP_HOST" "0.0.0.0" || return 2
修改/etc/default/jenkins文件
将默认的8080端口改成xxxx
# port for HTTP connector (default 8080; disable with -1)
# HTTP_PORT=8080
HTTP_PORT=xxxx
原文地址:https://www.cnblogs.com/lozz/p/9962316.html