首页 > 其他分享 >Jenkins 安装

Jenkins 安装

时间:2022-12-01 02:11:23浏览次数:58  
标签:will Step command jenkins Jenkins Docker 安装

Option 1: Install Jenkins with Homebrew

Step 1: Install Homebrew

If you don’t already have the Homebrew package manager installed, you will first need to follow the installation steps from https://brew.sh/.

You can check if Homebrew is already installed by opening a terminal window and typing:

brew --version

You should get back the Homebrew version if already installed.

homebrew-macos

 

Step 2: Install Jenkins

Once Homebrew is installed, you can run the following command which will download and install the current Long-term support (LTS) version of Jenkins.

brew install jenkins-lts

homebrew-jenkins

Step 3: Start the Jenkins server

The next step is to actually start the Jenkins server. You can do that with this command:

brew services start jenkins-lts

This will start the Jenkins server in a few seconds. You can check if it is properly working by visiting http://localhost:8080/

Step 4: Get the installation password

To get the password needed to run the installation process, just check the content of the file mentioned on the screen.

jenkins install screen

 

Now, let’s use the cat command directly in the terminal, for example (replace with your own file path):

cat /Users/valentin/.jenkins/secrets/initialAdminPassword

jenkins pwd

Check the last section of this article on how to complete the setup process.

 

Starting and stopping Jenkins

To stop the Jenkins server, open any terminal window and enter the command:

brew services stop jenkins-lts

To start the Jenkins server again, use the command:

brew services start jenkins-lts

 

Option 2: Install Jenkins with Docker

Step 1: Install Docker

This step requires that you have Docker installed on your system. If this is not the case, make sure you download and install Docker Desktop

Step 2: Run the Jenkins Docker image

Once Docker is up-and-running, you can open a new terminal window and paste the following command:

docker run -p 8080:8080 -p 50000:50000 -v ~/jenkins_home:/var/jenkins_home jenkins/jenkins:lts

This command will download the current Long-term support (LTS) version of Jenkins and will spin-up a new Docker container. You can learn more about the different options available at the official Jenkins Docker documentation page.

Step 3: Wait for the installation to complete

Initially, it should take a few minutes to download and install, but you should soon see in the terminal no longer displaying anything new.

This indicates that the container is now working and waiting for you to complete the Jenkins installation.

Step 4: Get the installation password

Open a new browser window and go to http://localhost:8080/

You will be asked to input the installation password that should still be visible in the terminal.

macos cli jenkins pwd

 

Starting and stopping Jenkins

To stop Jenkins, you can go to the terminal window where you started the Docker container and hit Command + C. This will stop the process running the Docker container thus stopping Jenkins.

If you need to start Jenkins again, run the exact same command as when you have installed Jenkins.

 

How to Configure Jenkins

Once you have installed Jenkins in any of the ways presented, it is time to do the final setup.

Step 1: Install plugins

Jenkins is composed of multiple components called plugins. The next step asks you which plugins you would like to install. Just install the suggested plugins. Don’t worry about this – you can easily add or remove plugins later. Just install the suggested plugins.

jenkins plugins

 

Step 2: Create a Jenkins User

The next step is to create a Jenkins admin user. Make sure you write down the username and password as you will need them later.

jenkins user

 

Step 3: Configure the Jenkins URL

The final step is to configure the URL for the Jenkins server. This would be prefilled for you. So all you need to do is to click “Save and continue“.

jenkins-url

 

Soon the server will be configured and ready for action.

jenkins-ready

 

标签:will,Step,command,jenkins,Jenkins,Docker,安装
From: https://www.cnblogs.com/yaoyangding/p/16940289.html

相关文章

  • 普罗米修斯-docker安装
    1、只有一台服务器,所以使用docker来进行试验#安装dockercurl-fsSLhttps://get.docker.com|bash-sdocker--mirrorAliyun#查看安装版本docker--version#查看安装......
  • jmeter教程01环境、安装
    介绍jmeter是一个开源测试软件,器覆盖了负载、功能、性能、回归测试等类别,需要JDK5或者更高的版本。概述performancetest最佳性能预期,在给定基础架构配置下的。loa......
  • 1、安装TVM
    环境:腾讯云UbuntuServer20.04LTS64bit1、安装gitsudoapt-getinstallgit2、安装vimsudoapt-getinstallvim3、安装gcc11、g++11sudoapt-getinstal......
  • debian 安装 RabbitMQ
    首先安装Erlang环境apt-getinstallerlang检查安装是否成功erl搜索apt下是否有rabbitmq-serverapt-cachesearchrabbitmq-server 安装apt-getinstall......
  • 使用 docker 安装 gitea 仓库
    使用docker安装gitea仓库前提需要Linux系统安装好了dockercompose安装步骤准备文件(官方文档复制相应的compose文件,这里选了个基本的)version:"3"networks:g......
  • ubuntu安装java
    1、首先下载Ubuntu上的Java安装包到这个链接DownloadtheLatestJavaLTSFree下载Linux的Java版本  如果是在Ubuntu上下载的,那么下载下来的文件应该在用户目录下......
  • 【arm64】centos7安装nginx_vts_exporter,实现监控
    由于官方nginx_vts_exporter是没有arm架构的包的,最新版本也只有源码包,需要arm安装包或者安装最新版本,只能自己下载源码包进行编译安装 nginx_vts_exporter是用go写的,自......
  • Ubuntu上安装Chrome浏览器
      1、下载Chrome安装包执行命令:wgethttps://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb   2、安装Chrome浏览器执行命令:sud......
  • zabbix基于容器化在UOS1050E上面的安装与使用
    前言想着能够监控一下操作系统的日志.因为国产化的需求,所以我这边使用了UOS1050E安装zabbix时多次提示缺少php-json或者是缺少一些libevent等组件.自己尝试进行解决......
  • Google Chrome(谷歌浏览器)安装使用
    谷歌浏览器官网https://www.google.cn/chrome/ Chrome是由Google开发的一款简单便捷的网页浏览工具。谷歌浏览器(GoogleChrome)可以提帮助你快速、安全的搜索到自己需......