Changes between Initial Version and Version 1 of CentOS_7_YUM


Ignore:
Timestamp:
05/19/16 14:24:17 (9 years ago)
Author:
sky
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CentOS_7_YUM

    v1 v1  
     1= CentOS 7 yum & rpm =
     2
     3{{{
     4## 更换默认源,添加EPEL源
     5sed -i "/^enabled/ s/1/0/" /etc/yum/pluginconf.d/fastestmirror.conf
     6sed -i 's/^#baseurl/baseurl/g' /etc/yum.repos.d/CentOS-Base.repo
     7sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Base.repo
     8sed -i 's/mirror.centos.org/mirrors.aliyun.com/g' /etc/yum.repos.d/CentOS-Base.repo
     9rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
     10
     11## 修改默认配置
     12sed -i '/SELINUX/ s/enforcing/disabled/g' /etc/selinux/config
     13sed -i 's/4096/65535/g' /etc/security/limits.d/20-nproc.conf
     14cat <<EOM >/etc/security/limits.d/30-nfile.conf
     15*          soft    nofile     65535
     16root       soft    nofile     unlimited
     17EOM
     18
     19## 关闭不用的服务
     20systemctl stop postfix.service NetworkManager.service wpa_supplicant.service
     21systemctl disable postfix.service NetworkManager.service wpa_supplicant.service
     22
     23## 工具包
     24yum install -y wget lsof rsync unzip vim chrony tcpdump bind-utils lftp ftp telnet nmap pciutils sysstat lrzsz
     25yum update -y
     26
     27}}}
     28