CentOS Linux release 7 安裝完成後中止幾個服務

1、中止郵件服務
[root@localhost ~]# systemctl stop postfix # 臨時關閉linux

[root@localhost ~]# systemctl disable postfix # 永久關閉
Removed symlink /etc/systemd/system/multi-user.target.wants/postfix.service.
[root@localhost ~]# 網絡

2、中止打印服務:
[root@localhost ~]# systemctl stop cups.path # 臨時關閉
[root@localhost ~]# systemctl stop cups.socket # 臨時關閉
[root@localhost ~]# systemctl stop cups.service # 臨時關閉socket

[root@localhost ~]# systemctl disable cups.path # 永久關閉
Removed symlink /etc/systemd/system/multi-user.target.wants/cups.path.
[root@localhost ~]# systemctl disable cups.socket # 永久關閉
Removed symlink /etc/systemd/system/sockets.target.wants/cups.socket.
[root@localhost ~]# systemctl disable cups.service # 永久關閉
Removed symlink /etc/systemd/system/multi-user.target.wants/cups.service.
Removed symlink /etc/systemd/system/printer.target.wants/cups.service.
[root@localhost ~]#ide

3、中止rpcbind:
[root@localhost ~]# systemctl stop rpcbind.socket # 臨時關閉
[root@localhost ~]# systemctl stop rpcbind # 臨時關閉post

[root@localhost ~]# systemctl disable rpcbind.socket # 永久關閉
Removed symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket.
[root@localhost ~]# systemctl disable rpcbind # 永久關閉
[root@localhost ~]#code

4、關閉SELinux,將 /etc/sysconfig/selinux 中的 SELinux=enforcing 修改成 SELinux=disabled
臨時關閉,重啓失效:
#setenforce 0
#getenforceci

5、關閉firewall:
#中止firewall
systemctl stop firewalld.service rpc

#禁止firewall開機啓動
systemctl disable firewalld.service 

#查看默認防火牆狀態(關閉後顯示notrunning,開啓後顯示running)
firewall-cmd --state

6、關閉NetworkManagerget

# systemctl stop NetworkManager        # 臨時關閉
    # systemctl disable NetworkManager   # 永久關閉網絡管理命令
相關文章
相關標籤/搜索