CentOS-6.5 system base Optimization with optimized script

Source: Internet
Author: User

Optimize content:

(1. Set history history

(2. Add ordinary users, set sudo permissions

(3. Prevent root remote user from logging in

(4. Modify Remote port

(5. Streamlined boot server

(6. Close SELinux

(7. Configure Iptables

(8. Modify the maximum number of connections Ulimit

(9. Disable the use of the Ctrl+alt+del shortcut key to restart the server

(10. Modify default DNS

(11. Install necessary software, update yum source [Epel Source]

(12. Update the kernel and software to the latest version

(13. Optimize kernel parameters [adjusted according to actual situation]

(14. Remove last logged in information

(15. Turn off the boot display kernel information

1. Set History history

Echo ' Export histfile= $HOME/.bash_history export histfilesize= histsize= export histtimeformat= '%F%T ' WhoAmI ' "Export prompt_command=" HISTORY-A; History-c; History-r, "Shopt-s histappend typeset-r prompt_command typeset-r histtimeformat ' >/etc/profile.d/history.sh sour Ce/etc/profile

2. Add ordinary users, set sudo permissions

Username= ' Dyt ' password= ' dyt2015 ' useradd $username; echo $password | passwd--stdin $username sed-i "A$username all= (All) Nopasswd:all"/etc/sudoers

3. Prevent root remote user from logging in

  sed -i 

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.