zoukankan      html  css  js  c++  java
  • centos7 php、nginx、mongodb开机启动

    php

    vi /lib/systemd/system/php-fpm.service

    [Unit]
    Description=php-fpm
    After=network.target
    [Service]
    Type=forking
    ExecStart=/etc/init.d/php-fpm -c /usr/local/php/etc/php.ini
    PrivateTmp=true
    [Install]
    WantedBy=multi-user.target


    nginx

    vi /lib/systemd/system/nginx.service

    [Unit]
    Description=nginx
    After=network.target
    [Service]
    Type=forking
    ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    ExecReload=/usr/local/nginx/sbin/nginx -s reload
    ExecStop=/usr/local/nginx/sbin/nginx -s quit
    PrivateTmp=true
    [Install]
    WantedBy=multi-user.target

    mongodb
    vi /lib/systemd/system/mongod.service

    [Unit]
    Description=mongodb
    After=network.target remote-fs.target nss-lookup.target
    [Service]
    Type=forking
    ExecStart=/etc/init.d/mongod --dbpath /data/mongodb --logpath /usr/local/mongodb/logs --auth --fork
    ExecReload=/bin/kill -s HUP $MAINPID
    ExecStop=/etc/init.d/mongod --dbpath /data/mongodb  --shutdown
    PrivateTmp=true
    [Install]
    WantedBy=multi-user.target


    修改对应的ExecStart   ExecReload  ExecStop的值保存就可以

    加入开机启动

    systemctl enable php-fpm.service

    systemctl enable nginx.service

    systemctl enable mongod.service

  • 相关阅读:
    MAC SAP for JAVA配置
    工艺路线查询
    工单批量关闭
    BOM批量查询
    SE11/SE16N修改表数据
    PI/PO Token配置
    标准IDOC同步物料
    SAP采购订单入库后不允许修改单价增强
    Sap Hana 关于BP的一些理解
    Sap MM 定义物料号码范围
  • 原文地址:https://www.cnblogs.com/changfengSven/p/7235315.html
Copyright © 2011-2022 走看看