2

install Java

1.Install software-properties-common so we can add custom aptitude repositories:

sudo apt-get install software-properties-common

2.Add a Personal Package Archive that has a Java installer:

sudo apt-add-repository ppa:webupd8team/java

3.Update aptitude packages:

sudo apt-get update

4.Install Java 8:

sudo apt-get install oracle-java8-installer

check java version

java -version

install Jenkins

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

change port

 vim /etc/default/jenkins
port for HTTP connector (default 8080; disable with -1)
  HTTP_PORT=8080

begin jenkins

sudo service jenkins start

note

如果用腾讯云,请开启安全组策略

登陆密码

cat /var/lib/jenkins/secrets/initialAdminPassword

然后自己进行一系列活动,下篇文件讲 job任务


西树先森
7.1k 声望926 粉丝

从事开发多年,前端、后端(go、Python、php)、服务架构都有涉猎,经历过大公司、创业公司,擅长前端及公司技术选型。