摘要:
一. centos7yum install -y wgetmv /etc/yum.repos.d/CentOS-Base.repo&nb...
一. centos7
yum install -y wget mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo sed -i '/aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo rpm -ivh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # 注意时间是否当前时间,否则可能会出现访问https网站证书过期的错误. # ntpdate ntp1.aliyun.com yum clean all yum makecache yum install -y htop iftop dmidecode iotop mailx sysstat nfs-utils lrzsz rsync bc acpid vim wget openssh-clients unzip ntpdate net-tools traceroute libcurl-devel gcc bind-utils build-essential tcl8.4 tk8.4 gettext autoconf perl-devel zlib zlib-devel dstat # mysql/docker看需要是否安装 yum install -y mysql mysql-community-server yum install -y docker-ce # 部分服务的启停控制 systemctl start acpid systemctl enable acpid systemctl stop postfix systemctl disable postfix systemctl stop firewalld systemctl disable firewalld # Openfiles tunning: cat>> /etc/security/limits.conf <<-EOF * soft nproc 65535 * hard nproc 65535 * soft nofile 65535 * hard nofile 65535 EOF sed -r -i 's/1024|4096/10240/g' /etc/security/limits.d/20-nproc.conf sed -i '/^SELINUX\>/{s/enforcing/disable/}' /etc/sysconfig/selinux /etc/selinux/config cat >>/etc/profile<<EOF HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S `whoami` " HISTSIZE="10000" EOF
二. centos6
yum install -y wget mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo sed -i '/aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo rpm -ivh https://repo.mysql.com/mysql-community-release-el6-7.noarch.rpm # 注意时间是否当前时间,否则可能会出现访问https网站证书过期的错误. # ntpdate ntp1.aliyun.com yum clean all yum makecache yum install -y htop iftop dmidecode iotop mailx sysstat nfs-utils lrzsz rsync bc acpid vim wget openssh-clients unzip ntpdate net-tools traceroute libcurl-devel gcc bind-utils build-essential tcl8.4 tk8.4 gettext autoconf perl-devel zlib zlib-devel dstat # mysql/docker看需要是否安装 yum install -y mysql yum install -y docker-io # 部分服务的启停控制 setenforce 0 service start acpid chkconfig acpid on service stop iptables chkconfig iptables off chkconfig docker on # Openfiles tunning: cat>> /etc/security/limits.conf <<-EOF * soft nproc 65535 * hard nproc 65535 * soft nofile 65535 * hard nofile 65535 EOF sed -r -i 's/1024|4096/10240/g' /etc/security/limits.d/90-nproc.conf sed -i '/^SELINUX\>/{s/enforcing/disable/}' /etc/sysconfig/selinux /etc/selinux/config cat >>/etc/profile<<EOF HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S `whoami` " HISTSIZE="10000" EOF
还没有评论,来说两句吧...