zoukankan      html  css  js  c++  java
  • centos7下配置的php命令

    1:进入到/lib/systemd/system/目录
    cd /lib/systemd/system/
    2:创建php-fpm.service文件,并编辑
     vim php-fpm.service
    
    内容入下:
    [Unit]
    Description=The PHP FastCGI Process Manager
    After=syslog.target network.target
    
    [Service]
    Type=simple
    PIDFile=/run/php-fpm.pid
    ExecStart=/usr/local/php7/sbin/php-fpm --nodaemonize --fpm-config /usr/local/php7/etc/php-fpm.conf
    ExecReload=/bin/kill -USR2 $MAINPID
    ExecStop=/bin/kill -SIGINT $MAINPID
    
    [Install]
    WantedBy=multi-user.target
    
    
    注意:[Service]的启动、重启、停止命令全部要求使用绝对路径
    [Install]运行级别下服务安装的相关设置,可设置为多用户,即系统运行级别为3
    
    
    
    systemctl enable *.service #开机运行服务
    systemctl disable *.service #取消开机运行
    systemctl start *.service #启动服务
    systemctl stop *.service #停止服务
    systemctl restart *.service #重启服务
    systemctl reload *.service #重新加载服务配置文件
    systemctl status *.service #查询服务运行状态
    systemctl --failed #显示启动失败的服务
    

      

  • 相关阅读:
    js 正则表达式
    JAVA jdk环境搭建
    VMWareStation10 密钥
    linux xshell jdk hadoop(环境搭建) 虚拟机 安装(大数据搭建环境)
    linux hadoop jdk虚拟机下配置
    Linux shell基础(四)
    Linux shell基础(二)
    Linux shell基础(三)
    Linux shell基础(一)
    html
  • 原文地址:https://www.cnblogs.com/xin-jun/p/9413905.html
Copyright © 2011-2022 走看看