redhat 7 + systemctlをチェック

redhat 7 + systemctlをチェック

私はこれをredhat 7で試しました。

systemctl list-unit-files --type=service|grep iptables

or

systemctl list-unit-files --type=service|grep firewall

しかし、何の出力も得られません。これは、iptables / firewallがsystemctlから削除されたことを意味しますか?

また、Linux Redhatにiptablesがインストールされているのを見ました。

# rpm -qa |grep iptables
iptables-1.4.21-16.el7.x86_64

答え1

注文する

systemctl list-unit-files --type=service|grep iptables

iptables-servicesがインストールされていないため、iptablesは表示されません!

iptables サービスをインストールするには、以下を実行する必要があります。

yum install iptables-services



yum install iptables-services
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can    use subscription-manager to register.
Resolving Dependencies
 --> Running transaction check
 ---> Package iptables-services.x86_64 0:1.4.21-16.el7 will be installed
 --> Finished Dependency Resolution

 Dependencies Resolved

 ================================================================================================================================================================
 Package                                     Arch                                 Version                                   Repository                            Size
================================================================================================================================================================
Installing:
iptables-services                           x86_64                              1.4.21-16.el7                             updates                            50    k

Transaction Summary
 ================================================================================    ================================================================================
 Install  1 Package

Total download size: 50 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
iptables-services-1.4.21-16.el7.x86_64.rpm                                                                                                 |  50 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : iptables-services-1.4.21-16.el7.x86_64                                                                                                         1/1
  Verifying  : iptables-services-1.4.21-16.el7.x86_64                                                                                                         1/1

Installed:
iptables-services.x86_64 0:1.4.21-16.el7

Complete!

今systemctlはそれを示しています - :)

  # systemctl list-unit-files --type=service|grep iptables
  iptables.service                       disabled

関連情報