Linux System Basic Optimization

Source: Internet
Author: User

Centos6

#!/bin/bash

Yum Clean All

Yum Makecache | | Echo-e "\e[1;31m Please check the" This Yum source address is correct \e[0m "


# before the installation check

For I in $ (echo "man openssh-clients elinks lsof dstat sysstat vim");d O

service_packages=$ (Rpm-qa |grep "^" $i "-[0-9]")

If [$? = = 0];then

Echo-e "\e[1;32m $service _packages is installed!\e[0m"

Else

Echo-e "\e[1;31m $i is not installed!,in the Installing,please wait.\e[0m"

Yum install $i-y >/dev/null 2>&1

Fi

Done




grep "Nofile 65535"/etc/security/limits.conf | | echo "*-Nofile 65535" >>/etc/security/limits.conf


grep ignorespace/etc/profile.d/history.sh | | echo "Export Histcontrol=ignorespace" >>/etc/profile.d/history.sh; source/etc/profile.d/history.sh


grep "Export Histtimeformat"/etc/profile.d/history.sh | | echo ' Export histtimeformat= '%f-%t "' >>/etc/profile.d/history.sh


This article is from the "Silence" blog, make sure to keep this source http://silencezone.blog.51cto.com/3613477/1882459

Linux System Basic 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.