Install a Jenkins on Ubuntu system

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Install a Jenkins on Ubuntu system相关的知识,希望对你有一定的参考价值。

================================================================================
Jenkins Environment
================================================================================

prerequisites: install java
check if Java is not already installed:
java -version
If it returns "The program java can be found in the following packages", Java hasn‘t been installed yet, so execute the following command:
sudo apt-get install default-jre

 

#use deploy user goes to install jenkins service

su - deploy

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


sudo systemctl enable jenkins
sudo /etc/systemd/systemd-sysv-install enable jenkins


check the service whether is running normally:

```sudo service jenkins status```

 

run Jenkins:

```sudo service jenkins start```

 

stop Jenkins:

```sudo service jenkins stop```

 

restart Jenkins:

```sudo service jenkins restart```

 

 

Install Directory:/var/lib/jenkins
Log Directory:/var/log/jenkins/jenkins.log

 

================================================================================











以上是关于Install a Jenkins on Ubuntu system的主要内容,如果未能解决你的问题,请参考以下文章

Install Jenkins 2.1.36 and openjdk 1.7.0 on centos 7

Install Swagger on Ubuntu

How to install VNC server on CentOS 6

[Chapt1] Redis Install on linux

Install a Redmine on Ubuntu system

mac下 jenkins配置allure commandline报错 is not a directory on the Jenkins master (but perhaps it exists o