1. 程式人生 > >小白學習Red Hat Linux7.0系列三之vsftp安裝指令、防火牆(firewalld)指令、SElinux設定、systemctl指令、vsftp安裝步驟

小白學習Red Hat Linux7.0系列三之vsftp安裝指令、防火牆(firewalld)指令、SElinux設定、systemctl指令、vsftp安裝步驟

systemctl命令

    systemctl命令是系統服務管理器指令,它實際上將 service 和 chkconfig 這兩個命令組合到一起,本人也是在使用Red Hat Linux7.0發現原"service httpd start"失效後,才瞭解的systemctl命令,特此展示已提示大家!

任務 舊指令 新指令
使某服務自動啟動 chkconfig --level 3 httpd on systemctl enable httpd.service
使某服務不自動啟動 service httpd status systemctl disable httpd.service
檢查服務狀態 chkconfig --level 3 httpd off systemctl status httpd.service (服務詳細資訊) systemctl is-active httpd.service (僅顯示是否 Active)
顯示所有已啟動的服務 chkconfig --list systemctl list-units --type=service
啟動某服務 service httpd start systemctl start httpd.service
停止某服務 service httpd stop systemctl stop httpd.service
重啟某服務 service httpd restart systemctl 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. 關閉防火牆,首先檢視防火牆的狀態,Active顯示為’dead’為關閉狀態,顯示’running’為開啟狀態,若狀態為開啟狀態則執行停止指令關閉防火牆。

在這裡插入圖片描述

  1. 修改/etc/selinux/config檔案中的SELINUX為disabled(SELINUX=disabled),然後reboot重啟。

在這裡插入圖片描述

在這裡插入圖片描述