Primary management of SELinux
1. What is a SELinux
Selinux : kernel-level enhanced firewall
2. How to manage SELinux levels
SELinux turned on or off
Vim/etc/sysconfig/selinux
selinux=disabled off state
selinux=enforcing Mandatory State
selinux=permissive Warning status
Getenforce View status
when SELinux is turned on
Setenforce 0|1 changing the SELinux run level
3. How to change the file security context
Temporary changes
chcon-t Security Context File
Chcon-t Public_content_t/publicftp-r
Permanent changes
semanage fcontext-l # #列出内核安全上下文列表内容
Semanage fcontext-a-T public_content_t '/publicftp (/.*)? '
restorecon-fvvr/publicftp/
4. How to control the SELinux switch to the service function
getsebool-a | grep service Name
getsebool-a | grep FTP
setsebool-p function bool value On|off
setsebool-p Ftpd_anon_write on
5. Monitor the SELinux error message
Setroubleshoot-server
System Recovery
1. System Startup process
Power
BIOS (in read-only storage on the motherboard, basic input or output system)
function, hardware detection, activation hardware
Grub System boot (grub boot divided into two stages)
1) Stage 1 MBR (Master boot record) master boot record 0 tracks on hard disk, one sector, 446 bytes
*) dd If=/dev/zero Of=/dev/vda bs=446 count=1 can empty MBR
*) go to save mode, perform chroot/mnt/sysimage switch to real/environment,
and execute GRUB2-INSTALL/DEV/VDA
2) Phase 2 Grub File boot phase
Locate the/boot partition
Read /boot/grub2/grub.cfg
file lost,grub2-mkconfig >/boot/grub2/grub.cfg
boot kernel, read-only mount /device
Testing equipment
Initialize the device driver
Enter the system initialization phase
Kernel is missing, the new kernel installation package can be resolved
RPM-IVH kernel-xxxxx.rpm--force
System initialization phase
system initialization phase load INITRD mirror
Open Initialization Process SYSTEMD
Start SELinux
Load Kernel parameters
Initialize the system clock, keyboard, host name
re-read/write mount /device
activating RAID,LVM
Activate quotas
start All services in the multi-user.target.wants
Turn on the Virtual Console
Start graphics
initramfs-' Uname-r '. IMG Lost by:
MKINITRD initramfs-' uname-r '. img ' uname-r '
Recovery
Enter rescue mode, PXE boot or CD-ROM (hang ISO image), troubleshoot, rescue mode Chroot/sysimage
Change Password
Start the system--"up and down" key interrupt read seconds-"E into the editor-" to modify the system initialization statements into read-write mode, Rd.break.
--"Change password--" Generate Automklebal file to let the system load the modified password
This article from the "12147236" blog, reproduced please contact the author!
Linux Rookie starter 2 system Recovery and SELinux