小白学习Red Hat Linux7.0系列三之vsftp安装指令、防火墙(firewalld)指令、SElinux设置、systemctl指令、vsftp安装步骤

    上接《小白学习Red Hat Linux7.0系列一之安装资源总结(VMware-workstation的安装号码和所有版本激活密匙、Linux6或7镜像版本提供)》《小白学习Red Hat Linux7.0系列二之bash: yum: command not found或Redhat This system is not registered with RHN错误》,本篇文章简单介绍下vsftp的安装命令、防火墙(firewalld)命令、SElinux设置。

systemctl命令

    systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起,本人也是在使用Red Hat Linux7.0发现原"service httpd start"失效后,才了解的systemctl命令,特此展示已提示大家!

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

vsftp指令

  1. 启动指令:systemctl start vsftpd.service
  1. 停止指令:systemctl stop vsftpd.service
  1. 状态查询指令:systemctl status vsftpd.service
  1. Linux开机时自动启动vsftpd指令:ystemctl enable vsftpd.service

防火墙(firewalld)指令

  1. 启动指令:sudo systemctl start firewalld.service
  1. 停止指令:sudo stop status firewalld.service
  1. 状态查询指令:sudo systemctl status firewalld.service
  1. 禁止指令:sudo systemctl disable firewalld.service

vsftp安装步骤

  1. 安装vsftp服务:yum install -y vsftpd,如报错请参照《小白学习Red Hat Linux7.0系列二之bash: yum: command not found或Redhat This system is not registered with RHN错误》

在这里插入图片描述

  1. 关闭防火墙,首先查看防火墙的状态,Active显示为’dead’为关闭状态,显示’running’为开启状态,若状态为开启状态则运行停止指令关闭防火墙。

在这里插入图片描述

  1. 修改/etc/selinux/config文件中的SELINUX为disabled(SELINUX=disabled),然后reboot重启。

在这里插入图片描述

4.启动vsftpd服务,在浏览器输入’ftp://192.168.0.92/’,'192.168.0.92’为虚拟机IP,登录成功!

在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值