rpm安装jenkins-2.426(插件可安装)

这篇具有很好参考价值的文章主要介绍了rpm安装jenkins-2.426(插件可安装)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Jenkins安装:jenkins-2.426.2-1.1.noarch.rpm

安装Jenkins

1、下载Jenkins

$wget https://mirrors.aliyun.com/jenkins/redhat-stable/jenkins-2.426.2-1.1.noarch.rpm

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

2、安装Jenkins

$rpm -ivh jenkins-2.426.2-1.1.noarch.rpm

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

3、修改配置文件

2.426版本的配置文件是/usr/lib/systemd/system/jenkins.service

修改以下途中部分

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

配置文件如下:

#
# This file is managed by systemd(1). Do NOT edit this file manually!
# To override these settings, run:
#
#     systemctl edit jenkins
#
# For more information about drop-in files, see:
#
#     https://www.freedesktop.org/software/systemd/man/systemd.unit.html
#

[Unit]
Description=Jenkins Continuous Integration Server
Requires=network.target
After=network.target

[Service]
Type=notify
NotifyAccess=main
ExecStart=/usr/bin/jenkins
Restart=on-failure
SuccessExitStatus=143

# Configures the time to wait for start-up. If Jenkins does not signal start-up
# completion within the configured time, the service will be considered failed
# and will be shut down again. Takes a unit-less value in seconds, or a time span
# value such as "5min 20s". Pass "infinity" to disable the timeout logic.
#TimeoutStartSec=90

# Unix account that runs the Jenkins daemon
# Be careful when you change this, as you need to update the permissions of
# $JENKINS_HOME, $JENKINS_LOG, and (if you have already run Jenkins)
# $JENKINS_WEBROOT.
User=root
Group=root

# Directory where Jenkins stores its configuration and workspaces
Environment="JENKINS_HOME=/var/lib/jenkins"
WorkingDirectory=/var/lib/jenkins

# Location of the Jenkins WAR
#Environment="JENKINS_WAR=/usr/share/java/jenkins.war"

# Location of the exploded WAR
Environment="JENKINS_WEBROOT=%C/jenkins/war"

# Location of the Jenkins log. By default, systemd-journald(8) is used.
#Environment="JENKINS_LOG=%L/jenkins/jenkins.log"
Environment="JENKINS_LOG=/var/log/jenkins/jenkins.log"

# The Java home directory. When left empty, JENKINS_JAVA_CMD and PATH are consulted.
#Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64"
Environment="JAVA_HOME=/home/java64/jdk-11.0.10"

# The Java executable. When left empty, JAVA_HOME and PATH are consulted.
#Environment="JENKINS_JAVA_CMD=/etc/alternatives/java"
Environment="JENKINS_JAVA_CMD=/home/java64/jdk-11.0.10/bin/java"

# Arguments for the Jenkins JVM
Environment="JAVA_OPTS=-Djava.awt.headless=true"

# IP address to listen on for HTTP requests.
# The default is to listen on all interfaces (0.0.0.0).
#Environment="JENKINS_LISTEN_ADDRESS="

# Port to listen on for HTTP requests. Set to -1 to disable.
# To be able to listen on privileged ports (port numbers less than 1024),
# add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities
# directive below.
Environment="JENKINS_PORT=8080"


# IP address to listen on for HTTPS requests. Default is disabled.
#Environment="JENKINS_HTTPS_LISTEN_ADDRESS="

# Port to listen on for HTTPS requests. Default is disabled.
# To be able to listen on privileged ports (port numbers less than 1024),
# add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities
# directive below.
#Environment="JENKINS_HTTPS_PORT=443"

# Path to the keystore in JKS format (as created by the JDK's keytool).
# Default is disabled.
#Environment="JENKINS_HTTPS_KEYSTORE=/path/to/keystore.jks"

# Password to access the keystore defined in JENKINS_HTTPS_KEYSTORE.
# Default is disabled.
#Environment="JENKINS_HTTPS_KEYSTORE_PASSWORD=s3cR3tPa55w0rD"

# IP address to listen on for HTTP2 requests. Default is disabled.
#Environment="JENKINS_HTTP2_LISTEN_ADDRESS="

# HTTP2 port to listen on. Default is disabled.
# To be able to listen on privileged ports (port numbers less than 1024),
# add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities
# directive below.
#Environment="JENKINS_HTTP2_PORT="

# Controls which capabilities to include in the ambient capability set for the
# executed process. Takes a whitespace-separated list of capability names, e.g.
# CAP_SYS_ADMIN, CAP_DAC_OVERRIDE, CAP_SYS_PTRACE. Ambient capability sets are
# useful if you want to execute a process as a non-privileged user but still
# want to give it some capabilities. For example, add the CAP_NET_BIND_SERVICE
# capability to be able to listen on privileged ports (port numbers less than
# 1024).
#AmbientCapabilities=CAP_NET_BIND_SERVICE

# Debug level for logs. The higher the value, the more verbose. 5 is INFO.
#Environment="JENKINS_DEBUG_LEVEL=5"

# Set to true to enable logging to /var/log/jenkins/access_log.
#Environment="JENKINS_ENABLE_ACCESS_LOG=false"

# Servlet context (important if you want to use reverse proxying)
#Environment="JENKINS_PREFIX=/jenkins"

# Arbitrary additional arguments to pass to Jenkins.
# Full option list: java -jar jenkins.war --help
#Environment="JENKINS_OPTS="

# Maximum core file size. If unset, the value from the OS is inherited.
#LimitCORE=infinity

# Maximum file size. If unset, the value from the OS is inherited.
#LimitFSIZE=infinity

# File descriptor limit. If unset, the value from the OS is inherited.
#LimitNOFILE=8192

# Maximum number of processes. If unset, the value from the OS is inherited.
#LimitNPROC=32768

# Set the umask to control the permission bits of files that Jenkins creates.
#
# 0027 makes files read-only for group and inaccessible for others, which some
# security sensitive users might consider beneficial, especially if Jenkins
# is running on a server that is used for multiple purposes. Beware that 0027
# permissions would interfere with sudo scripts that run on the controller
# (see JENKINS-25065).
#
# Note also that the particularly sensitive parts of $JENKINS_HOME (such as
# credentials) are always written without 'other' access. So the umask values
# only affect job configuration, build records, etc.
#
# If unset, the value from the OS is inherited, which is normally 0022.
# The default umask comes from pam_umask(8) and /etc/login.defs.
#UMask=0022

[Install]
WantedBy=multi-user.target

修改完成后执行systemctl daemon-reload重新加载配置文件。

4、加入自启动和启动jenkins

#设置开机自启

$systemctl enable jenkins

#启动Jenkins

$systemctl start jenkins

# 查看状态

$systemctl status jenkins

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

其他命令

备注:记得如果修改配置文件后,需要执行systemctl daemon-reload重新加载配置文件,systemctl enable jenkins.service --now,设置Jenkins开机启动,--now表示马上启动。

#查看是否自启动

systemctl is-enabled jenkins

# 查看状态:systemctl status jenkins
# 启动服务:systemctl start jenkins
# 重启服务:systemctl restart jenkins

二、配置Jenkins

1、访问jenkins,并设置管理员账号和密码

访问:http://ip:8080

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

输入密码,通过命令查到的密码

$cat  /var/lib/jenkins/secrets/initialAdminPassword

b3d0838884ce4c4b91828a4c88e9a2d9

2、安装插件和配置用户等

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

选择:安装推荐的插件(jenkins2.426无需修改源也可安装插件)

创建管理员用户

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

rpm安装jenkins-2.426(插件可安装),# CICD集合,linux,运维,服务器,jenkins

三、其他命令:

1、防火墙端口设置的一些命令
sudo systemctl status firewalld
sudo systemctl stop firewalld
sudo systemctl disable firewalld

firewall-cmd —zone=public —add-port=8888/tcp —permanent
firewall-cmd —reload

2、#查看是否自启动

systemctl is-enabled jenkins

3、#查询端口

netstat -lntp |grep 8080

4、卸载jenkins:

rpm -e --nodeps jenkins-2.426.2-1.1.noarch

如果不知道安装的是什么版本,可以rpm -qa | grep jenkins查询文章来源地址https://www.toymoban.com/news/detail-807948.html

到了这里,关于rpm安装jenkins-2.426(插件可安装)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【运维知识高级篇】超详细的Jenkins教程1(安装部署+配置插件+创建自由风格项目+配合gitlab实现Jenkins自动触发)

    Jenkins是一个开源软件项目,是基于Java开发的一种持续集成的工具,用于监控持续重复的工作, 旨在提供一个开放易用的平台,使软件的持续集成变成可能,是持续集成的核心,可以与其他软件进行协作,例如,gitlab推送给测试环境代码,可以通过Jenkins省略步骤,实现自动

    2024年02月05日
    浏览(49)
  • linux系统从零开始搭建CICD jenkins环境

    本文教你从零开始搭建jenkins环境,开始你的CICD之旅。 1.1 系统与安装环境 本文的环境为云服务器环境,系统为linux Red-hat系统。版本信息如下: Linux version 3.10.0-1160.88.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP 如果是linux其它系统,也

    2024年02月04日
    浏览(52)
  • 【Jenkins】Centos环境安装Jenkins(通过rpm安装)

    在Centos操作系统中通过rpm安装Jenkins 参考官网 https://www.jenkins.io/doc/book/installing/linux/#red-hat-centos 下载安装 验证Java安装 配置使用的仓库 安装jenkins 启动Jenkins服务 首次启动时,会自动创一个管理员账号,通过如下指令查看管理员密码 Jenkins启动默认端口8080,可以通过如下指令临

    2024年02月04日
    浏览(42)
  • Jenkins 2.426.3新版设置中文

    1. 插件页面显示无法联网 ,点击Plugins一直提示连接超时,设置公司代理后 2. 稍等一会儿点击如下图,插件就出来了,然后输入 Locale进行下载 3. 以下是我下载安装好的 4.打开设置,找到Locale选项,设置成zh_CN ,点击保存  但是还是没效果... 最后卸载了上面的插件下载了以下两

    2024年02月21日
    浏览(36)
  • 【Jenkins】rpm方式安装Jenkins(2.401,jdk版本17)

    目录 【Jenkins】rpm方式安装Jenkins 1、主机初始化 2、软件要求 RPM包安装的内容 配置文件说明 3、web操作   [root@jenkins ~]#source /etc/profile [root@jenkins ~]#java -version   rpm方式安装 [root@jenkins ~]# rpm -ivh jenkins-2.181-1.1.noarch.rpm   启动jenkins [root@jenkins ~]# jenkins start (保持打开状态)   [

    2024年02月11日
    浏览(42)
  • jenkins-2.401-1.1.noarch.rpm 的公钥没有安装

    yum update 报错,Jenkins 没能升级成功: warning: rpmts_HdrFromFdno: Header V4 RSA/SHA512 Signature, key ID ef5975ca: NOKEY jenkins-2.401-1.1.noarch.rpm 的公钥没有安装 安装新的公钥: 再次升级,成功。

    2024年02月11日
    浏览(31)
  • Linux(CentOS)运维脚本工具集合

    备份指定目录 查看CPU、磁盘、内存使用率 返回结果 显示基础信息-详细 查看进程pid,启动时间,持续执行时间 根据进程id查看工作目录 清除Linux系统占用缓存 查看端口是否使用 demo: 查看进程使用的端口 demo 查看端口所在进程 demo 查看目录下各目录占用空间以及最大文件或

    2024年02月12日
    浏览(46)
  • 自动化运维CICD

    目录 概述 为什么持续集成和发布可以提高效率 如何实现 1、在linux服务器安装部署代码仓库 2、安装jenkins 使用shell脚本实现CICD 使用pipeline实现CICD 使用Blue Ocean实现CICD 持续集成(Continuous Integration,CI)和持续发布(Continuous Delivery,CD,又称持续交付)是经常放在一起提及的两

    2024年02月05日
    浏览(46)
  • 基于Jenkins的CICD

    已安装docker并设置为开机自启 已安装Docker-Compose 基于docker安装Jenkins jenkins官网 编写docker-compose.yml文件 首次启动会因为数据卷data目录没有权限导致启动失败,设置data目录写权限(/usr/local/docker/jenkins_docker/data) 启动jenkins 在/usr/local/docker/jenkins_docker目录下执行 访问地址 账号密码

    2024年04月22日
    浏览(50)
  • jenkins的cicd操作

    持续集成( Continuous Integration) 持续频繁的(每天多次)将本地代码“集成”到主干分支,并保证主干分支可用 持续交付(Continuous Delivery) 是持续集成的下一步,持续频繁地将软件的新版本交付到类生产环境(类似于预发),交付给测试、产品验收。 持续交付强调的是“

    2024年02月14日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包