CentOS 7 启动、重启、chkconfig等命令已经合并为systemctl
CentOS 7系统服务启动、重启、设置服务启动项命令以合并为,systemctl . 现在用service 或/etc/init.d/命令,重启,重新启动,停止等没效果,因为命令合并为systemctl. 新命令具体内容如下:
以启动httpd和设置Apache httpd为服务启动为例子:
centos7之前的命令是这样:
service httpd start 启动Apache httpd
service httpd restart 重新启动
service httpd stop 停止服务
chkconfig –levels 235 httpd on 开机启动httpd
或是:
/etc/init.d/ httpd start 启动
/etc/init.d/ httpd restart 重新启动
/etc/init.d/ httpd stop 停止服务
centos7吧这些命令全部合并了,使用也更加方便,当然也是习惯问题,如果习惯了之前命令,centos新命令还得适应适应,其实很简单,只要这样记忆,使用就比较方便了.
systemctl 动作 服务名.service
一些centos7 systemctl命令简单实用实例:
systemctl start httpd.service /启动Apache httpd
systemctl restart httpd.service /重新启动
systemctl stop httpd.service /停止服务
systemctl enable httpd.service /开机启动httpd
systemctl disable httpd.service /禁止开机启动httpd
CentOS 7 启动、重启、chkconfig等命令已经合并为systemctl的更多相关文章
- cmd启动,重启,停止IIS命令
直接使用CMD我们可以操作很多事情,比如启动IIS,重启IIS,停止IIS 重启IIS服务器,开始->运行->cmd (以下列出相关操作命令): iisreset /RESTART 停止后 ...
- Linux CentOS开机启动项设置命令:chkconfig
1.开机启动+++crontab 定时执行(定时执行可参考:https://www.cnblogs.com/prefectjava/p/9399552.html)可实现自动化运行的目的,简化了维护人员 ...
- centos MySQL主从配置 ntsysv chkconfig setup命令 配置MySQL 主从 子shell MySQL备份 kill命令 pid文件 discuz!论坛数据库读写分离 双主搭建 mysql.history 第二十九节课
centos MySQL主从配置 ntsysv chkconfig setup命令 配置MySQL 主从 子shell MySQL备份 kill命令 pid文件 discuz!论坛数 ...
- CentOS 6.4 php-fpm 添加service 添加平滑启动/重启
nginx通过FastCGI运行PHP比Apache包含PHP环境有明显的优势,最近有消息称,PHP5.4将很有可能把PHP-FPM补丁包含在内核里,nginx服务器平台上运行PHP将更加轻松,下面我 ...
- 【转】centos关机与重启命令详解
连接:http://blog.csdn.net/jiangzhengdong/article/details/8036594 Linux centos关机与重启命令详解与实战 Linux centos ...
- 批处理命令行CMD启动停止重启IIS的命令
原文:批处理命令行CMD启动停止重启IIS的命令 启动IIS: net start iisadmin (IIS的整个服务) net start w3svc (WWW网页WEB服务) ...
- nginx启动,重启,关闭命令
nginx启动,重启,关闭命令 停止操作停止操作是通过向nginx进程发送信号(什么是信号请参阅linux文 章)来进行的步骤1:查询nginx主进程号ps -ef | grep nginx在进程列表 ...
- centos关机与重启命令 shutdown -r now 立刻重启
centos关机与重启命令详解与实战 Linux centos重启命令: .reboot .shutdown -r now 立刻重启(root用户使用) .shutdown -r 过10分钟自动重启( ...
- 【Nginx】启动,重启,关闭命令
原文地址 https://github.com/zhongxia245/blog/issues/18欢迎 star nginx启动,重启,关闭命令 时间:2016-09-23 16:52:22 启动 ...
随机推荐
- 3Sum——leetcode
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...
- PE530 : GCD of Divisors
\[\begin{eqnarray*}ans&=&\sum_{i=1}^nf(i)\\&=&\sum_{i=1}^n\sum_{d|i}\gcd(d,\frac{i}{ ...
- 【BZOJ1503】[HAOI2007]反素数ant 搜索
结论题...网上讲的好的很多... #include <iostream> using namespace std; ]={,,,,,,,,,},num=; long long ans,n ...
- js获取?后面具体参数的值
function getURLParam(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' ...
- ZeroMQ接口函数之 :zmq_bind - 绑定一个socket
ZeroMQ 官方地址 : http://api.zeromq.org/4-0:zmq-bind zmq_bind(3) ZMQ Manual - ZMQ/3.2.5 Name zmq_bind - ...
- Python In Action:一、入门小例子
Python In Action这本书真是有点猛,一开头就来这么个例子: import wx class MyFrame(wx.Frame): def __init__(self): wx.Frame ...
- java Properties 配置信息类
Properties(配置信息类):主要用于生产配置文件和读取配置文件信息. ----> 是一个集合类 继承HashTable 存值是以键-值的方式. package com.beiwo.io; ...
- DateUtil工具类
package com.autoserve.mh.common.util; import java.text.SimpleDateFormat; import java.util.Calendar ...
- 【xcode】qt程序不通过qmake,运行找不到动态库的坑
现象:试图在一个已有项目里增加qt的代码,因此手动加入相关framework(未通过qmake生成工程),编译连接都通过,但是运行时崩溃,提示错误: dyld: Library not loaded ...
- SQL DEFAULT 约束
DEFAULT 约束用于向列中插入默认值. 如果没有规定其他的值,那么会将默认值添加到所有的新记录. 下面的 SQL 在 "Persons" 表创建时为 "City&qu ...