================================================================================
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
================================================================================