#本次采用系统均为CentOS7
# 有互联网环境下,初始化服务器环境
mv /etc/yum.repos.d /etc/yum.repos.d_bak && \
mkdir /etc/yum.repos.d && \
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo && \
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo && \
yum clean all && \
yum makecache fast && \
yum -y install vim net-tools sysstat nmon nfs-utils lsof fio wget unzip && \
systemctl stop firewalld && \
systemctl stop NetworkManager && \
systemctl disable firewalld && \
systemctl disable NetworkManager && \
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config && \
echo '* soft nofile 65535' >> /etc/security/limits.conf && \
echo '* hard nofile 65535' >> /etc/security/limits.conf
#如已做过简单初始化或云服务器可不用执行初始化,但需要安装yum

主从复制&spm=1001.2101.3001.5002&articleId=151070275&d=1&t=3&u=ec21e9f87946433387c7087803b9f194)
2334

被折叠的 条评论
为什么被折叠?



