891人加入学习
(2人评价)
Linux网络操作系统常见服务的安装与配置

基于VMWARE15和红帽7Linux(RHEL7)

价格 免费

一。防火墙操作

1.在之前的版本(Redhat7以前命令:

关闭防火墙等服务的命令是

service iptables stop

2.RHEL7中新命令

其实没有这个服务,在RHEL7开始,使用systemctl工具来管理服务程序,包括了servicechkconfig

 

[root@localhost test]# systemctl list-unit-files| grep fire

firewalld.service                           enabled

 

启动一个服务:systemctl start firewalld.service

关闭一个服务:systemctl stop firewalld.service

重启一个服务:systemctl restart firewalld.service

显示一个服务的状态:systemctl status firewalld.service

在开机时启用一个服务:systemctl enable firewalld.service

在开机时禁用一个服务:systemctl disable firewalld.service

查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?

查看已启动的服务列表:systemctl list-unit-files|grep enabled

 

二。ssh服务器

1.查看服务状态

systemctl status sshd

2.安装服务器

这是网络操作系统最重要的服务。
安装后检查
[root@localhost test]# rpm -qa| grep ssh
openssh-clients-6.6.1p1-22.el7.x86_64
openssh-server-6.6.1p1-22.el7.x86_64
libssh2-1.4.3-10.el7.x86_64
openssh-6.6.1p1-22.el7.x86_64

安装的话一定安装64位的,即带.x86_64后缀的

3.启动服务器

检查服务是否已经安装

[root@localhost test]# systemctl list-unit-files |grep sshd

sshd.service  enabled(表示服务器已开启)

 

systemctl stop sshd.service    redhat7版本命令

systemctl start sshd.service

systemctl restart sshd.service

3.配置服务器

systemctl disable sshd.service   禁止开机启动

systemctl enable sshd.service   开机启动

 

配置文件位置

/etc/ssh/sshd_config

Port 22  登录端口

PermitRootLogin yes   是否允许root登录

[展开全文]

授课教师

专注Unity的VR开发

课程特色

下载资料(1)
视频(26)

学员动态