# 有互联网环境下,初始化服务器环境
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-utils,用以导出所有mysql的安装包及依赖包在离线环境下安装

最低0.47元/天 解锁文章
1658

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



