zoukankan      html  css  js  c++  java
  • linux服务

    服务(service)本身就是进程,但是是运行在后台的,通常都会监听某个端口,等待其他程序的请求,
    比如(mysql,sshd防火墙等),因此我们又称为守护进程,是Linux非常重要的知识点。
    Service管理指令
    service 服务名 start|stop|restart|reload|status
    在centOS7.0中不再使用service,而是systemctl
    案例:
    查看防火墙状态
    service iptables status 
    
    关闭防火墙
    service iptables stop
    可以通过talnet指令查看linux的某个端口是否在监听,并且可以访问
    telnet (linux)ip 端口
    查看服务指令
    Setup 就可以看到系统服务
    chkconfig指令
        Chkconfig命令可以给每个服务的各个运行级别设置自启动/关闭
        基本语法
        1. 查看服务 chkconfig --list |grep xxx
        2. chkconfig 服务名 --list
        3. chkconfig --level 5服务名 on/off
    案例:chkconfig --list

    案例:
    让sshd服务在运行级别为5的时候关闭
    chkconfig --level 5 sshd off
    
    注意:重新设置后 需要reboot重新启动才能生效
  • 相关阅读:
    PHP安装linux
    nginx 安装
    Redis安装
    linux启动http服务
    收藏的有用的网页
    laravel框架部署后有用命令
    .net 报错access to the path c: empimagefilesmsc_cntr_0.txt is denied
    oracle 触发器
    学习Auxre记录
    mysql数据库索引
  • 原文地址:https://www.cnblogs.com/cbxBlog/p/9165220.html
Copyright © 2011-2022 走看看