Install jenkins under Mac and the solution to the error

1. Installation

1. Enter the command: brew install jenkins installation

When an error occurs, install jenkins and report an error, as shown in the following figure:

The solution is linked below:

Mac terminal: brew command not found solution - Gray letter network (software development blog aggregation)

Check brew version: brew -v 

Successful installation

2. Install jenkins again: brew install jenkins 

The error is as follows:

 Solution: brew -v, view the prompt information, the user needs to configure the file path of homebrew-cask and homebrew-core as safe.directory, that is, execute the command:

(1) git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core

(2) git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask

 3. Install jenkins again: brew install jenkins, the installation is successful

 Two, start

1. After the installation is complete, execute the startup command
brew services start jenkins

报错:Error: uninitialized constant Homebrew::Service::System

 Solution: cd /opt/homebrew/Library/Taps/homebrew

rm -rf /opt/homebrew/Library/Taps/homebrew/homebrew-services

Then update homebrew-services via the brew tap command:

brew tap homebrew/services

2. Restart jenkins: start successfully

brew services start jenkins 

 3. Browser access jenkins, enter http://localhost:8080/

The page could not be opened when visiting:

Solution: You need to install JDK version 11, if the version does not match, the page will be inaccessible

Install Java version 11, check the version number after the installation is successful: java -version

(1) Enter the jenkins official website: Jenkins download and deployment

Download the .war package in the figure

 After the download is successful, start

cd Downloads

java -jar jenkins.war

 After starting Jenkins, you can enter on the browser: http://localhost:8080/

​​​​​​​

 

3. Jenkins configuration

1. Find the initial password input as shown in the figure, and click Continue 

2. Select "Install recommended plug-ins" until the installation is successful

Guess you like

Origin blog.csdn.net/weixin_40650522/article/details/129777587