• Centos7 初始化


    systemctl disable firewalld
    sed -ri '/^[^#]*SELINUX=/s#=.+$#=disabled#' /etc/selinux/config
    grubby --args="user_namespace.enable=1" --update-kernel="$(grubby --default-kernel)"
    mkdir -p /etc/yum.repos.d/backup
    mv /etc/yum.repos.d/* /etc/yum.repos.d/backup/
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    yum install -y wget telnet vim sysstat lrzsz lsof zip unzip bash-completion ntp
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    cp /usr/share/bash-completion/completions/docker /etc/bash_completion.d/
    echo "set paste" >> /etc/vimrc
    sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config 
    sed -i 's##Port 22#port 22201#g' /etc/ssh/sshd_config
    sed -i 's/#PermitRootLogin yes/PermitRootLogin no/g'  /etc/ssh/sshd_config
    useradd centos
    echo centos:Lcsmy123 | chpasswd
    cat<<EOF > /etc/sysctl.d/docker.conf
    # 要求iptables不对bridge的数据进行处理
    net.bridge.bridge-nf-call-ip6tables = 1
    net.bridge.bridge-nf-call-iptables = 1
    net.bridge.bridge-nf-call-arptables = 1
    EOF
    
    sysctl --system
    
    cat<<EOF>> /etc/security/limits.conf
    root soft nofile 65535
    root hard nofile 65535
    EOF
    
    cat<<EOF>> /etc/rc.local
    ulimit -SHn 65535 
    EOF
    
    chmod +x /etc/rc.d/rc.local
    
    reboot
    
  • 相关阅读:
    属性MyBank
    C#语法
    NTE与C#
    css3制作网页动画
    网页定位元素
    使用ADO.NET访问数据库
    连接查询和分组查询
    模糊查询和聚合函数
    习题集
    用sql语句操作数据
  • 原文地址:https://www.cnblogs.com/fsckzy/p/10830960.html
Copyright © 2020-2023  润新知