CentOS 6.x 最小化安装推荐安装的依赖包和修改内核参数
CentOS 6.x 最小化安装推荐安装的依赖包
我在日常工作中,新建的xenserver的虚拟机,CentOS release 6.9 (Final)操作系统,采用最小化安装,后续很多操作需要各种依赖包,经过一些时间的积累,推荐安装如下依赖包。前提是需要yum源先配置好,最好能联网,采用网络yum源。
yum clean all yum -y update yum -y install gd libxml2-devel libjpeg-devel libpng-devel net-snmp-devel wget telnet vim zip unzip yum -y install curl-devel libxslt-devel pcre-devel libjpeg libpng libcurl4-openssl-dev yum -y install libcurl-devel libcurl freetype-config freetype freetype-devel unixODBC libxslt yum -y install libtool openssl-devel readline-devel readline yum -y install perl-devel perl-ExtUtils-Embed yum -y install ncurses-devel.x86_64 openldap-devel.x86_64 lrzsz openssh-clients gcc-g77 bison yum -y install libmcrypt libmcrypt-devel mhash mhash-devel bzip2 bzip2-devel yum -y install ntpdate rsync svn patch iptables iptables-services yum -y install libevent libevent-devel cyrus-sasl cyrus-sasl-devel yum -y install gd-devel libmemcached-devel memcached git libssl-devel libyaml-devel auto yum -y install gcc gcc-c++ make autoconf automake ncurses-devel ncurses cmake libaio libaio-devel boost yum -y install perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-IO-Socket-SSL perl perl-devel yum -y groupinstall "Server Platform Development" "Development tools" yum -y groupinstall "Development tools"
另外新建的虚拟机,也需要修改内核参数。
# 修改系统内核参数 cat >> /etc/sysctl.conf <<EOF fs.file-max=655360 fs.aio-max-nr = 1048576 kernel.sem = 5050 646400 5050 128 kernel.shmmax = 137438953472 kernel.shmall = 4294967296 kernel.shmmni = 4096 net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_mem = 94500000 915000000 927000000 net.core.wmem_default = 8388608 net.core.rmem_default = 8388608 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.core.netdev_max_backlog = 32768 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_fin_timeout = 10 net.ipv4.tcp_keepalive_time = 300 net.ipv4.tcp_max_syn_backlog = 32768 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_timestamps = 0 net.ipv4.conf.default.accept_source_route = 0 vm.swappiness=1 EOF # 使其生效 sysctl -p