Jenkins installation under Mac

Source: Internet
Author: User
Tags install brew

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.