Security Operations under Linux, to be backed up before use
cd/etc/yum.repos.d/
Ls
renamed CP Centos-base.repo Centos-base.repo.ori
original documents represented by the Ori
Wget ( get URL download ) :Http://...../Centos-Base-163.repo
Ls
Replace the original Base
Cp Centos-base-163.repo Centos-base.repo
Replace the original Base
Yum grouplist View package groups, pack those packages
SELinux is the security Agency for the implementation of mandatory access control protection, but it has everything to do, so the enterprise does not often use SELINUX
making SELINUX under Linux
Cat/etc/selinux/config
Selinux=enforcing The default is this, which means to close the first method of modification
Vi/etc/selinux/config
Modify Selinux=diasbled and save
The second method of modification
Sed-i S#selinux=enforcing#selinux=disabled#g/etc/selinux/config
check with grep.
Grep "disabled" /etc/selinux/config
also use getenforce to query SELINUX status
use setenforce 0 to change the status, which displays Permissive
View current system RunLevel with runlevel
Forgot password operation:
1. when booting, not only press ESC to enter the GRUB interface, press e
2. Select the Kernerl line and click e to enter
3. at the end add: Space single, enter back to the previous step. Kernerl
4. Press B to start the system;
The Linux system startup process is designed to optimize the process, under the virtual machine
Setup-----System serbices----Remove the * and not start it.
if the DC 4 boot Start program, as follows:
SSD Remote Control rsyslog system recording function crond Timer task Network
Chkconfig--list|grep "3:on" View the program started on level 3, if it is in Chinese with lang=en to adjust
Thought just needs to turn off the unwanted.
For Oldboy in ' chkconfig--list|grep ' 3:on ' |awk ' {print '} ' |grep-ve ' CROND|NETWORK|RSYSLOG|SSD ' ';d o chkconfig $oldboy of F;done
the inverted single quotation marks above are The button under ESC.
Echo A >> Ett.txt
Echo a >> ett.txt
Echo b>> Ett.txt
Grep-e "a| B "Ett.txt is case-sensitive and filters a and b out
Grep-ei "a| B "Case -insensitive,chkconfig view set boot automatic software command;
Secure operation under Linux