Installation method
1) Install Brew install Jenkins from the command line, you may encounter the situation of first updating brew HTTPS://BREW.SH/INDEX_ZH-CN;
2) installation via PKG, official website: https://jenkins.io/
After the installation is complete, the browser http://localhost:8080 will open automatically, then follow the prompts according to your needs Next (the latest version of the interface is Chinese, do not worry about not understand)
Unloading
1) command line installation, use the command line to uninstall brew Uninstall Jenkins
2) Installation via Pkg
sudo launchctl unload/library/launchdaemons/org.jenkins-ci.plist
sudo rm/library/launchdaemons/org.jenkins-ci.plist
sudo rm-rf/applications/jenkins "/Library/Application support/jenkins"/library/documentation/jenkins
sudo rm-rf/users/shared/jenkins
sudo dscl. -delete/users/jenkins
sudo dscl. -delete/groups/jenkins
Launchctl can be understood to perform timed tasks and start Jenkins at boot time. can be done by
sudo launchctl list | grep Jenkins to see if there is a Jenkins service set to boot up, actual load, unload is a plist file
Permissions issues
This will make me desperate, online method I tried many times, even Jenkins I have to re, uninstall not more than 5 times. I decided to summarize it to prevent someone from falling into the pit again.
After Jenkins is installed, it defaults to a new user, Jenkins, the attribute daemon group, which can be viewed via sudo open/library/launchdaemons/org.jenkins-ci.plist.
The group name and username can be obtained through the shell command (ID, whoami), or through "system Preferences" –> "Users and Groups" first unlock the lower left corner of the lock, and then select the current user, right
Stop Jenkins Service
sudo launchctl unload/library/launchdaemons/org.jenkins-ci.plist
Restart
sudo launchctl load/library/launchdaemons/org.jenkins-ci.plist
If you encounter/library/launchdaemons/org.jenkins-ci.plist:path had bad ownership/permissions
You can use the following command to handle
sudo chown root/library/launchdaemons/org.jenkins-ci.plist
sudo chgrp wheel/library/launchdaemons/org.jenkins-ci.plist
sudo chmod 777/library/launchdaemons/org.jenkins-ci.plist
Run sudo launchctl load/library/launchdaemons/org.jenkins-ci.plist again
View related properties of a file
$ sudo ls–l/library/launchdaemons/org.jenkins-ci.plist
$ whoami
Compare, the current login shll, whether there is permission to operate, the default is Jenkins user, restart the computer to see if Jenkins can start normally
If the access localhost:8080 fails after a reboot, you can use the manual boot
zsh/library/application\ support/jenkins/jenkins-runner.sh
To confirm whether to join the boot boot, you can use the command
If you still encounter problems, uninstall, Reload, try a few more times, the above command basically all familiar with >_<
Jenkins installation under Mac