zoukankan      html  css  js  c++  java
  • linux的系统服务

    1、编辑一个sevice文件

    vim  /usr/lib/systemd/system/elasticsearch.service
    

    2、设置相关的用户和路径

    # 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.
    [Unit]
    Description=elasticsearch
    After=network.target
    
    [Service]
    Type=simple
    User=elasticsearch
    Group=elasticsearch
    LimitNOFILE=100000
    LimitNPROC=100000
    Restart=no
    ExecStart=/opt/elasticsearch-7.12.0/bin/elasticsearch
    PrivateTmp=true
    
    [Install]
    WantedBy=multi-user.target 
    

     

    3、开启相关的服务

    systemctl status elasticsearch
    systemctl start  elasticsearch
    

      

  • 相关阅读:
    leetcode-409
    leetcode-836
    leetcode-1160
    leetcode-面试题13
    leetcode-695
    go的一些小lib
    leetcode-300
    cookie
    php上传文件
    PHP 文件创建/写入
  • 原文地址:https://www.cnblogs.com/0205gt/p/15012037.html
Copyright © 2011-2022 走看看