首页 > 代码库 > CentOS7系统优化
CentOS7系统优化
CentOS7系统优化
1、更改yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2、添加补全服务功能
yum install -y bash-completion
3、关闭防火墙
systemctl stop firewalld.service
4、关闭selinux
sed -i ‘s#SELINUX=disable#SELINUX=disabled#g‘ /etc/sysconfig/selinux
5、安装常用软件
yum install lrzsz tree nmap dos2unix -y
6、时间同步服务
修改时区
timedatectl set-timezone Asia/Shanghai
ntpdate time1.aliyun.com
###time lock service by root###
*/5 * * * * /usr/sbin/ntpdate ntp1.aliyun.com &>/dev/null
7、安装常用软件包
yum groupinstall "Compatibility libraries" "Base" "Development tools" -y
8、安装常用依赖
yum install -y perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-IO-Socket-SSL perl-Socket6 perl-Time-HiRes perl-ExtUtils-MakeMaker rrdtool rrdtool-perl curl httpd httpd-devel gcc make wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel perl-CGI-SpeedyCGI perl-Sys-Syslog popt-devel libidn-devel fping openssl openssl-devel pcre pcre-devel
9、手动更新预先安装的软件
yum -y update && reboot
本文出自 “wtlinux” 博客,请务必保留此出处http://wtlinux.blog.51cto.com/11253430/1864593
CentOS7系统优化