Linux system post-installation optimization

Source: Internet
Author: User

I learned Linux operations, after watching Oldboy video tutorial, to learn the knowledge to summarize, knowledge content are from Oldboy video tutorial.

###########################################################################

1. Add Users. In the enterprise product environment, should try to avoid directly to the root user operation.

Add User: Useradd Oldboy oldboy is the user name you take

Set User password: passwd oldboy (Interactive settings) or echo "*******" |passwd--stdin Oldboy

View the current user WhoAmI

User switch su-oldboy root switch to Oldboy does not require a password, which in turn needs to enter the root user's password.


2.yum source settings. Yum installs the software, the default download RPM package is the official source of foreign countries, and sometimes in order to improve the download speed, we need to change the Yum source to a domestic source.

At present, there are http://mirrors.sohu.com/and http://mirrors.163.com/of the common update sources in the domestic fast speed.

The code is as follows:

CD/ETC/YUM.REPOS.D entering the catalogue

/BIN/MV Centos-base.repo Centos-base.repo.ori backup

wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo Download

/BIN/MV Centos-base-sohu.repo Centos-base.repo Replacement

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/86/03/wKioL1eymEuj60D0AALInbeM-ic507.png-wh_500x0-wm_3 -wmp_4-s_2872268049.png "title=" Qq20160816084832.png "alt=" Wkiol1eymeuj60d0aalinbem-ic507.png-wh_50 "/>


3. Install the necessary packages

Yum Install Lrzsz sysstat-y installation

Rpm-qa sysstat lrzsz View

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/86/04/wKiom1eyoMbBE0tHAAI4rdm5vig569.png-wh_500x0-wm_3 -wmp_4-s_194705778.png "title=" 2.png "alt=" Wkiom1eyombbe0thaai4rdm5vig569.png-wh_50 "/>


4. Turn off SELinux. SELinux is a security mechanism in Linux systems that can sometimes cause a lot of trouble for users.

Sed-i ' s/selinux=enforcing/selinux=disabled/' etc/selinux/config modified

grep selinux=disabled/etc/selinux/comfig Confirm the modification is complete (develop good habits)

Setenforce 0 Provisional effective order

Getenforce View selinux status

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/86/04/wKiom1eypBuTlmxuAAFiBgxb4sg797.png-wh_500x0-wm_3 -wmp_4-s_2474725838.png "title=" Off SELinux "alt=" Wkiom1eypbutlmxuaafibgxb4sg797.png-wh_50 "/>


5. Set RunLevel to 3. Run level settings

grep 3:initdefault Etc/inittab

Id:3:initdefault

Linux runs at six levels (0-6)

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/86/04/wKioL1eyp82x9P3ZAAEeqAp2My8196.png-wh_500x0-wm_3 -wmp_4-s_3039270183.png "title=" 4.png "alt=" Wkiol1eyp82x9p3zaaeeqap2my8196.png-wh_50 "/>


6. Streamline boot up.

Setup brings up the Setup window, sets the startup item in system services, or directly enters the NTSYSV command to bring up the Startup Item Settings window in System services.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/86/04/wKioL1eyqtyBrG1zAABcAHU3v60284.png "title=" 5.png " alt= "Wkiol1eyqtybrg1zaabcahu3v60284.png"/>

Complete the script directly, close all the startup items, and then open the service that you want to boot.

lang=en convert characters to avoid garbled display

For Oldboy in ' chkconfig--list|grep 3:on|awk ' {print '} ';d o chkconfig--level 3 $oldboy

Off;done shutdown more services with boot-up

For Oldboy in Crond network syslog sshd;d o chkconfig – Level 3 $oldboy On;done

Set up Crond network syslog sshd four service boot

Chkconfig--list|grep 3:on View

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/86/05/wKioL1eysfaS_9ohAADoirx9uMU768.png "title=" Linux system optimization 4.png "alt=" Wkiol1eysfas_9ohaadoirx9umu768.png "/>

Finish ************************************************


This article is from the "11961592" blog, please be sure to keep this source http://11971592.blog.51cto.com/11961592/1839218

Linux system post-installation optimization

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.