Jenkins安装目录为 /usr/local/jenkins-tomcat/

  添加文档

/usr/lib/systemd/system/jenkins.service

  

[Unit]
Description=jenkins
After=network.target [Service]
Type=forking
#PIDFile=/usr/local/tomcat/tomcat.pid
ExecStart=/usr/local/jenkins-tomcat/bin/startup.sh
ExecReload=
ExecStop=/usr/local/jenkins-tomcat/bin/shutdown.sh
PrivateTmp=true [Install]
WantedBy=multi-user.target

  重新导入systemctl

 systemctl daemon-reload

  手动关闭jenkins然后使用systemctl启动并且添加至自启动

 /usr/local/jenkins-tomcat/bin/shutdown.sh
systemctl start jenkins
systemctl enable jenkins

  

Jenkins加入systemctl管理的更多相关文章

  1. 源码安装Nginx以及用systemctl管理

    一.源码安装Nginx: 先安装gcc编译器(安装过的可以忽略) [root@localhost ~]# yum -y install gcc gcc-c++ wget 进入src目录 [root@l ...

  2. [原]Jenkins(十三)---jenkins用户权限管理

    * 版权声明:本博客欢迎转发,但请保留原作者信息! http://www.cnblogs.com/horizonli/p/5337874.html 两种策略的比较

  3. 【Devops】【docker】【CI/CD】jenkins源码管理,添加SSH地址后报错+Jenkins构建报错:Please make sure you have the correct access rights and the repository exists.

    jenkins源码管理,添加SSH地址后报错: Could not read from remote repository. Please make sure you have the correct ...

  4. Gitlab+Jenkins学习之路(九)之Jenkins的远程管理和集群

    一.Jenkins的远程管理 Jenkins的远程管理方式包含: Shell ssh SSH Plugin ansible.saltstack (1)Shell ssh在项目构建时,jenkins使用 ...

  5. 手动编译安装Libvirt之后利用systemctl管理libvirtd服务

    因为要给特殊的虚拟机关联文件指定selinux标签,而默认的Libvirt没有这个功能,所以需要修改LIbvirt源代码,重新编译安装Libvirt,而手动编译安装的LIbvirt,没有办法使用sys ...

  6. CentOS7 安装tomcat为系统服务器 Systemctl管理Tomcat,并设置开机启动

    本文转载:http://blog.chinaunix.net/uid-24648266-id-5729891.html CentOS7开始,从/etc/init.d脚本改为了systemctl管理服务 ...

  7. Linux学习-透过 systemctl 管理服务

    透过 systemctl 管理单一服务 (service unit) 的启动/开机启动与观察状态 一般来说,服务的启动有两个阶段,一 个是『开机的时候设定要不要启动这个服务』, 以及『你现在要不要启动 ...

  8. CentOS7.5下开发systemctl管理的自定义Nginx启动服务程序

    一.systemctl知识简介 从CentOS7 Linux开始,系统里的网络服务启动已经从传统的service改成了systemctl(一个systemd工具,主要负责控制systemd系统和服务管 ...

  9. centos7把编译安装的服务通过systemctl管理

    nginx编译安装的目录是/usr/local/nginx nginx配置文件是/usr/local/nginx/conf/nginx.conf systemctl管理的服务文件在/usr/lib/s ...

随机推荐

  1. IIS:URL Rewrite实现vue的地址重写

    vue-router 全局配置 const router = new VueRouter({ mode: 'history', routes: [...] }) URL Rewrite 1.添加规则 ...

  2. &和&&,|和||的用法区别

    &和&&的区别是,&会执行两边,不管第一个是否成立&&只会执行一边,如果第一个条件为假,则不会走第二个条件举例public class Test2{ p ...

  3. E:nth-of-type(n)

    E:nth-of-type(n) 语法: E:nth-of-type(n) { sRules } 说明: 匹配同类型中的第n个同级兄弟元素E.深圳dd马达 要使该属性生效,E元素必须是某个元素的子元素 ...

  4. SpringMVC拦截器及多拦截器时的执行顺序

    本文链接:https://blog.csdn.net/itcats_cn/article/details/80371639拦截器的配置步骤 springmvc.xml中配置多个拦截器配置自定义拦截器并 ...

  5. springboot启动时执行任务CommandLineRunner

    # SpringBoot中CommandLineRunner的作用> 平常开发中有可能需要实现在项目启动后执行的功能,SpringBoot提供的一种简单的实现方案就是添加一个model并实现Co ...

  6. https web service in Tibco & PC

    Error: 1.Certificate signature validation failed , Signature does not matchuse wrong public certific ...

  7. antd 表单获取参数

    wrappedComponentRef是为了把form的值赋值到自定的对象中 <OpenCityForm wrappedComponentRef={(inst)=>{this.cityFo ...

  8. 使用webuploader实现大文件上传

    javaweb上传文件 上传文件的jsp中的部分 上传文件同样可以使用form表单向后端发请求,也可以使用 ajax向后端发请求 1.通过form表单向后端发送请求 <form id=" ...

  9. 【IOI2019】2048矩形模拟

    /* dos windows 25*80 */ #include <algorithm> #include <windows.h> #include <iostream& ...

  10. 【概率论】5-5:负二项分布(The Negative Binomial Distribution)

    title: [概率论]5-5:负二项分布(The Negative Binomial Distribution) categories: - Mathematic - Probability key ...