您的位置:首页 > 运维架构 > Linux

linux系统初始化--​关于系统服务

2017-01-12 13:17 267 查看

关于系统服务

Linux下安装完成后会有很多默认启动的服务,下面我们介绍下linux的服务
RHEL6的最小化系统的默认服务
在RHEL6中我们可以使用chkconfig–list,来查看全部的系统服务。
服务名称
功能
推荐
Auditd
linux审计服务,这个在后面会说明下
开启
blk-availability
lvm卷的相关服务,如果使用lvm,推荐开启,其实可以关闭
可以关闭
Crond
linux计划任务
开启
ip6tables
ipv6 iptables 防火墙
不使用ipv6,关闭
Iptables
ipv4 iptables 防火墙
不使用ipv4,关闭
Iscsi
不使用iscsi,关闭
Iscsid
不当存储,关闭
lvm2-monitor
可以关闭
Mdmonitor
软raid的相关程序
推荐关闭
Multipathd
关闭
Netconsole
关闭
Netfs
网络文件系统自动挂载,如此服务被禁止,则不能自动挂载网络文件系统。
关闭
Network
网络服务
关闭
Postfix
Rdisc
自动检测路由器
关闭
Restorecond
selinux相关的服务,
关闭
Rsyslog
系统日志进程,如果关闭,则系统无法记录日志,
开启
Sasauthd
sas认证服务相关,
不使用sas认证,关闭
Sshd
ssh守护进程
udev-post
为新添加的usb设备提供即插即用服务,如果被禁用,则linux不在支持即插即用
视个人情况
RHEL7的最小化系统的默认服务
Shell># systemctl list-unit-files--type=service

对比
功能
RHEL6
RHEL7
查看全部服务
Shell>#chkconfig --list
Shell># systemctl list-units --type=service --all
查看
Shell>#
Shell>#systemctl
开启服务
Shell>#service network start
Shell># systemctl start network.service
关闭服务
Shell>#service network stop
Shell># systemctl stop network.service
重启服务
Shell># service network restart
Shell># systemctl restart network.service
运行状态
Shell># service network status
Shell># systemctl status network.service
开机启动
Shell>#chkconfig –level 3 network on
Shell>#systemctl enable network.service
禁止开机启动
Shell>#chkconfig –level 3 network off
Shell>#systemctl disable network.service
设置启动级别
Shell>
在系统安装完成后,有很多默认服务我们并不需要,所以我可以使用如下命令关闭,以ip6tables为例。
直接在系统中关闭服务
RHEL6
Shell># service ip6tables stop
RHEL7
systemctl stop firewalld.service
为防止系统重启后丢失配置,设置为重启后不再自动启动
RHEL6
Shell># chkconfig --level 3 ip6tables off
RHEL7
systemctl disable firewalld.service
验证
RHEL6
Shell># service ip6tables status
Ip6tables: Firewall is not running.
RHEL7
Shell># systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
Active: inactive (dead)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux 网络服务