ELK开机启动 service文件内容
为了实现ELK的3部分开机启动,可以添加各项服务对应的service文件,再通过systemctl enable XXX实现ELK所有服务开机启动。
Elasticsearch
elasticsearch.service (/usr/lib/systemd/system)
[Unit]
Description=Elasticsearch
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target [Service]
Environment=ES_HOME=/usr/share/elasticsearch
Environment=CONF_DIR=/etc/elasticsearch
Environment=DATA_DIR=/var/lib/elasticsearch
Environment=LOG_DIR=/var/log/elasticsearch
Environment=PID_DIR=/var/run/elasticsearch
EnvironmentFile=-/etc/sysconfig/elasticsearch WorkingDirectory=/usr/share/elasticsearch User=elasticsearch
Group=elasticsearch ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
-p ${PID_DIR}/elasticsearch.pid \
--quiet \
-Edefault.path.logs=${LOG_DIR} \
-Edefault.path.data=${DATA_DIR} \
-Edefault.path.conf=${CONF_DIR} # StandardOutput is configured to redirect to journalctl since
# some error messages may be logged in standard output before
# elasticsearch logging system is initialized. Elasticsearch
# stores its logs in /var/log/elasticsearch and does not use
# journalctl by default. If you also want to enable journalctl
# logging, you can simply remove the "quiet" option from ExecStart.
StandardOutput=journal
StandardError=inherit # Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536 # Specifies the maximum number of processes
LimitNPROC=2048 # Specifies the maximum number of bytes of memory that may be locked into RAM
# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/sysconfig/elasticsearch
#LimitMEMLOCK=infinity # Disable timeout logic and wait until process is stopped
TimeoutStopSec=0 # SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM # Send the signal only to the JVM rather than its control group
KillMode=process # Java process is never killed
SendSIGKILL=no # When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143 [Install]
WantedBy=multi-user.target # Built for distribution-5.5.2 (distribution)
Logstash
logstash.service (/etc/systemd/system)
[Unit]
Description=logstash [Service]
Type=simple
User=logstash
Group=logstash
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/logstash
EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"
Restart=always
WorkingDirectory=/
Nice=19
LimitNOFILE=16384 [Install]
WantedBy=multi-user.target
Kibana
kibana.service(/etc/systemd/system)
[Service]
ExecStart=/usr/local/kibana/bin/kibana [Install]
WantedBy=multi-user.target
ELK开机启动 service文件内容的更多相关文章
- 安卓开机启动service后台运行
安卓开机启动service后台运行 Android开机启动时会发送一个广播android.intent.action.BOOT_COMPLETED,捕捉到这个广播,然后可以进行相应的操作,比如:通过捕 ...
- Virtualbox开机启动,service命令管理
#!/bin/bash#chkconfig:235 80 20#description:start or stop vbox#Author:Qty~20180502#OS:RedHatEnterpri ...
- windows开机启动bat文件
1.运行 shell:startup 命令,如下: 2.创建bat的快捷方式,把改快捷方式添加到,C:\ProgramData\Microsoft\Windows\Start Menu\Program ...
- docker安装并设置开机启动(CentOS7/8)
CentOS7.2 docker分为CE和EE版本,EE版本收费,一般我们使用CE版本就满足要求了 docker安装及启动 docker安装很简单,直接使用如下命令安装即可,安装后的docker版本即 ...
- docker安装并设置开机启动(Linux)
docker 开机启动: systemctl enable docker 使用的linux系统为CentOS7.2 docker分为CE和EE版本,EE版本收费,一般我们使用CE版本就满足要求了 do ...
- Android如何配置init.rc中的开机启动进程(service)【转】
本文转载自:http://blog.csdn.net/qq_28899635/article/details/56289063 开篇:为什么写这篇文章 先说下我自己的情况,我是个普通的大四学生,之前在 ...
- Centos7.x:开机启动服务的配置和管理
一.开机启动服务的配置 1.创建服务配置(权限754) vim /usr/lib/systemd/system/nginx.service 文件内容解释 [Unit]:服务的说明Description ...
- centos7安装与配置nginx1.11,开机启动
1.官网下载安装包 http://nginx.org/en/download.html,选择适合Linux的版本,这里选择最新的版本,下载到本地后上传到服务器或者centos下直接wget命令下载. ...
- 转:CentOS7 下 Redis4 安装与配置教程(Redis开机启动)
转 https://ken.io/note/centos7-redis4-setup 一.前言 1.本教程主要内容 Redis安装与测试 Redis远程访问配置 Redis开机启动配置 2.本教程环境 ...
随机推荐
- PHP秒杀系统-高并发高性能的极致挑战
慕课网实战教程后端:1.java c++算法与数据结构2.java Spring Boot带前后端 渐进式开发企业级博客系统3.java Spring Boot企业微信点餐系统4.java Sprin ...
- Linux EXT 文件系统 详解
上几章我们讲到了Linux启动的一些问题,接下来我们来看一下硬盘分割和EXT格式文件系统的问题.前面提到了分区表的问题,分区表位于MBR, 占用64个字节.所谓的硬盘分区也就是对硬盘进行规划,填写分区 ...
- 《Flask Web开发——基于Python的Web应用开发实践》一字一句上机实践(上)
目录 前言 第1章 安装 第2章 程序的基本结构 第3章 模板 第4章 Web表单 第5章 数据库 第6章 电子邮件 第7章 大型程序的结构 前言 学习Python也有一个半月时间了,学到现在感觉 ...
- #centos7 创建内网yum源 OpenStack源部署
#centos7 创建内网yum源#centos7 自动化安装 本地 内网 web源创建.更新 createrepo http OpenStack源部署 Elven原创 http://www.cnbl ...
- 深入讲解HashMap原理
1. HashMap概述: HashMap是基于哈希表的Map接口的非同步实现.此实现提供所有可选的映射操作,并允许使用null值和null键.此类不保证映射的顺序,特别是它不保证该顺序恒久不变 ...
- 服务器获取浏览器发送请求中的cookies,选取自己需要的cookie
String cookieName = “userID”; // 设置自己需要的cookie名 Cookie cookies[] = request.getCookies(); // 获取请求中的所有 ...
- Outlook邮箱配置
1.在outlook邮箱里启用pop3 2.接收邮件服务器 pop3-mail.outlook.com 3.发送邮件服务器 smtp-mail.outlook.com 4.其他设置 -->发送服 ...
- 魔术常量(Magic constants)
魔术常量(Magic constants) PHP中的常量大部分都是不变的,但是有8个常量会随着他们所在代码位置的变化而变化,这8个常量被称为魔术常量. __LINE__,文件中的当前行号 __FIL ...
- 移动GIS未来的前景GIS解决方案应用
目前,在我国一些发达地区,移动GIS所需的两个技术前提——移动互联网的普及和智能终端的普及都已经得到了满足,特别是平板电脑.智能手机的流行,苹果产品的风靡,为移动GIS的应用提供了肥沃的土壤,而GIS ...
- ABAP CDS Table Function介绍与示例
Core data services(以下简称CDS)可以指两样东西,一个是HANA CDS,一个是ABAP CDS. 如我们所知,HANA CDS只支持HANA数据库,ABAP CDS理论上支持多种 ...