centos使用--软件启动关闭等操作的命令
关于centos服务的命令经常会遇到这几种
service
systemctl
/etc/init.d/
1 service和/etc/init.d/
service是一个脚本命令,分析service可知是去/etc/init.d目录下执行相关程序。service和chkconfig结合使用。
服务配置文件存放目录/etc/init.d/
命令使用:
service start nginx
/etc/init.d/nginx restart
2 systemctl
centos7 上面启动服务以及关闭服务已经不是以前的service stop/start xxxx了而是systemctl命令,不过用service他会有一个提醒你用systemctl,所以大可不必担心。
列出正在运行的服务状态——systemctl
启动一个服务——systemctl start postfix.service
关闭一个服务——systemctl stop postfix.service
重启一个服务:——systemctl restart postfix.service
显示一个服务的状态——systemctl status postfix.service
在开机时启用一个服务——systemctl enable postfix.service
在开机时禁用一个服务——systemctl disable postfix.service
查看服务是否开机启动——systemctl is-enabled postfix.service;echo $?
查看已启动的服务列表——systemctl list-unit-files|grep enabled
centos使用--软件启动关闭等操作的命令的更多相关文章
- redis centos 6.x 启动关闭脚本
#!/bin/sh #Configurations injected by install_server below.... EXEC=/usr/local/bin/redis-server CLIE ...
- Linux常用软件启动、停止、重启命令
一.PHP 启动命令: /usr/local/php5/sbin/php-fpm 停止命令: pkill php-fpm 二.MySQL 启动命令: /etc/init.d/mysqld start ...
- CentOS后台运行和关闭、查看后台任务命令
fg.bg.jobs.&.nohup.ctrl+z.ctrl+c 命令 一.& 加在一个命令的最后,可以把这个命令放到后台执行,如 watch -n 10 sh test.sh &am ...
- Linux下chkconfig命令详解即添加服务以及两种方式启动关闭系统服务
The command chkconfig is no longer available in Ubuntu.The equivalent command to chkconfig is update ...
- CentOS 6.X启动流程
CentOS 6.X启动流程 /boot分区 启动引导程序是默认可以识别boot分区的.因此在系统还无法加载硬盘的时候,boot分区是可以识别的! initramfs内存文件系统 CentOS 6.x ...
- centos6.5安装VNC、远程及启动关闭
标签: centos vnc 远程桌面 安装 详解 0.说明 安装服务的过程当中,最好是在联网环境下操作.由于涉及到远程连接的问题,系统的防火墙需要关闭,或者是做好相应的过滤策略.参考了网上很多大牛的 ...
- CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- Linux Centos下软件的安装与卸载方法
转载于: http://blog.csdn.net/zolalad/article/details/11368879 Linux下软件的安装与卸载 第一章 linux下安装软件,如何知道软件安 ...
- Centos 7搭建Gitlab服务器以及操作(创建项目,创建群组,创建用户,添加密钥)
一. 安装并配置依赖包 在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开 系统防火墙中的HTTP和SSH端口访问 安装前准备 命令: ...
随机推荐
- 2017.10.28 QB模拟赛 —— 上午
题目链接 T1 1e18 内的立方数有 1e6个 直接枚举可过 二分最优 考场用set 死慢.. #include <cstdio> int t; long long p; int ma ...
- Linux 使用第三方邮箱发邮件的设置
mail命令在Ubuntu下是需要安装的,使用下条命令进行安装: sudo apt-get install heirloom-mailx 在CentOS 下安装则是: yum install mail ...
- *389. Find the Difference (string + map(26)) read problems carefully
Given two strings s and t which consist of only lowercase letters. String t is generated by random s ...
- sql server 拆分字符串,拆分两次(:和;)
declare @DisciplineID int declare @paramStringVal nvarchar() declare @NPNT nvarchar() declare @Disci ...
- linux 内存地址空间管理 mm_struct
http://blog.csdn.net/yusiguyuan/article/details/39520933 Linux对于内存的管理涉及到非常多的方面,这篇文章首先从对进程虚拟地址空间的管理说起 ...
- Dijkstra单源最短路径,POJ(2387)
题目链接:http://poj.org/problem?id=2387 Dijkstra算法: //求某一点(源点)到另一点的最短路,算法其实也和源点到所有点的时间复杂度一样,O(n^2); 图G(V ...
- Hive 配置显示表头和数据库信息
在 conf/hive-site.xml 中添加如下配置 <property> <name>hive.cli.print.header</name> <val ...
- 在matlab中查看变量的数据类型
>> x = x = >> class(x) ans = double
- RandomUserAgentMiddleware练习
# 请求头添加随机user-agent class RandomUserAgentMiddleware(object): def __init__(self, agents): self.agent ...
- echarts学习笔记(部分angular及ant-design)
1.在项目中修改ng-zorro组件默认样式的一些方法: 类名等 前加::ng-deep: 类名等 前加:root: 类名等 前加:host /deep/: 2.echarts横轴自定义时间粒度 两种 ...