Secure operation under Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.