Linux: (03.01) Tiến hành Disable SELinux trên CentOS 7 (64bit)

By , 0 View

Mục tiêu thực hành:
- Kiểm tra trạng thái hiện tại của SELinux.
- Tiến hành Disable SELinux.
- Tiến hành khởi động lại CentOS 7.

Các bước triển khai:
Kiểm tra trạng thái hiện tại của SELinux.
[root@localhost ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
[root@localhost ~]# 

Tiến hành Disable SELinux.
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config

Tiến hành khởi động lại CentOS 7.
[root@localhost ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          disabled
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
[root@localhost ~]# 

[root@localhost ~]# reboot
[root@localhost ~]# sestatus
SELinux status:                 disabled
[root@localhost ~]# 

Mọi thắc mắc, các bạn vui lòng liên hệ với mình thông qua kênh Zalo (Jade Bùi) 076.877.2021.

You Might Also Like

0 comments