任务 旧指令 新指令
使某服务自动启动 chkconfig --level 3 httpd  on              systemctl enable httpd.service
使某服务不自动启动 chkconfig --level 3 httpd off systemctl disable httpd.service
检查服务状态 service httpd status systemctl status httpd.service (服务详细信息) 
systemctl is-active httpd.service (仅显示是否 Active)
显示所有已启动的服务 chkconfig --list systemctl list-units --type=service
启动某服务 service httpd start systemctl start httpd.service
停止某服务 service httpd stop systemctl stop httpd.service
重启某服务 service httpd restart systemctl restart httpd.service

启动nginx服务

systemctl start nginx.service

设置开机自启动

systemctl enable nginx.service

停止开机自启动

systemctl disable nginx.service

查看服务当前状态

systemctl status nginx.service

重新启动服务

systemctl restart nginx.service

查看所有已启动的服务

systemctl list-units --type=service

CentOS7设置开机自启动命令大全的更多相关文章

  1. CentOS7设置开机自启动方式

    方式一: # 在/etc/rc.d/rc.local文件中追加启动命令,该文件追加后,会随着机器自动后,自动运行文件中的命令 # vim /etc/rc.d/rc.local # 权限问题:在cent ...

  2. Linux服务器,服务管理--systemctl命令详解,设置开机自启动

    Linux服务器,服务管理--systemctl命令详解,设置开机自启动 syetemclt就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了. 摘要: syst ...

  3. Ubuntu14.04设置开机自启动脚本

    方法一.编辑rc.loacl脚本  Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...

  4. redis的安装与设置开机自启动

    redis 的安装配置: 可以直接去官网下载((https://redis.io/download) 解压文件到指定目录下  tar zxvf redis-5.0.7.tar.gz -C  /opt/ ...

  5. Fedora 16设置开机自启动程序与Ubuntu的区别

    Ubuntu设置开机自启动脚本的方法是:修改/etc/init.d/rc.local这个文件,添加需要启动的程序即可,相关函数如下: void SetSysAutoBoot() { ] = {}; ; ...

  6. linux_设置开机自启动程序脚本

    设置开机自启动

  7. CentOS 6下 Oracle11gR2 设置开机自启动

    [1] 更改/etc/oratab # This file is used by ORACLE utilities. It is created by root.sh # and updated by ...

  8. 设置开机自启动VirtualBox虚拟机系统

    如果常用VirtualBox虚拟机系统的话,设置个随开机启动也是很方便的.不需要打开VirtualBox窗口,直接就是系统启动了. 又继续上网搜索学习了.(设置开机自启动VirtualBox虚拟机系统 ...

  9. Ubuntu18.04 设置开机进入命令行模式

    首先来了解下启动级别(Runlevel): 指 Unix 或 类 Unix 操作系统下不同的运行模式,运行级别通常分为 7 级: 运行级别 0:系统停机状态,系统默认运行级别不能设为0,否则不能正常启 ...

随机推荐

  1. JavaScript Interview Questions: Event Delegation and This

    David Posin helps you land that next programming position by understanding important JavaScript fund ...

  2. [hihoCoder] #1158 : 质数相关

    时间限制:2000ms 单点时限:1000ms 内存限制:256MB 描述 两个数a和 b (a<b)被称为质数相关,是指a × p = b,这里p是一个质数.一个集合S被称为质数相关,是指S中 ...

  3. js实现精确统计网站访问量的代码分享

    JS 精确统计网站访问量. 代码如下: /** * vlstat 浏览器统计脚本 */ var statIdName = "vlstatId"; var xmlHttp; /** ...

  4. The DiskSpd Storage Performance Tool

    https://enterpriseitnotes.wordpress.com/2013/05/31/understanding-ios-iops-and-outstanding-ios/ https ...

  5. 【转】Update: Android.mk 中的 LOCAL_SRC_FILES, LOCAL_C_INCLUDES

    看原文请移步:Update: Android.mk 中的 LOCAL_SRC_FILES, LOCAL_C_INCLUDES 我在先前的两篇post 编写Android.mk中的LOCAL_SRC_F ...

  6. u-boot编译

    u-boot目的:启动内核1.从flash读出内核,放到SDRAM中2.启动内核 u-boot要实现的功能:-----硬件相关的初始化----  ---开发的功能---------    关看门够   ...

  7. LeetCode: Combinations 解题报告

    Combinations Given two integers n and k, return all possible combinations of k numbers out of 1 ... ...

  8. LeetCode: Populating Next Right Pointers in Each Node II 解题报告

    Populating Next Right Pointers in Each Node IIFollow up for problem "Populating Next Right Poin ...

  9. python2 除法保留两位小数

  10. C语言 · 报时助手

    基础练习 报时助手   时间限制:1.0s   内存限制:512.0MB          锦囊1 判断,字符串输出. 锦囊2 按要求输出,判断特殊情况.   问题描述 给定当前的时间,请用英文的读法 ...