Docker ʵս֮ CentOS7 ϵͳ»·¾³ÅäÖÃ
±¾ÎĵµÏêϸ½éÉÜ Docker ʵս֮ CentOS7 ϵͳ»·¾³ÅäÖã¬ÎªºóÆÚ°²×° Docker ×ö×¼±¸¡£
0 ÓÅ»¯»·¾³
Ö±½Ó¸´ÖÆÒÔÏ´úÂ룬ÓÅ»¯»·¾³£¬Èç¹ûÖ´ÐÐÁËһϴúÂ룬ÄÇô½ÓÏÂÀ´µÄ1ºÍ2²½Öè¿ÉÒÔ²»ÓÃÔÙ²Ù×÷ÁË¡£sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config &> /dev/nullsetenforce 0systemctl stop firewalldsystemctl disable firewalldiptables -Fsystemctl stop NetworkManager &> /dev/nullsystemctl disable NetworkManager &> /dev/null1 ¹Ø±ÕSELinuxºÍ·À»ðǽ
# vim /etc/selinux/configSELINUX=disabled# setenforce 0# getenforcePermissive2 ¹Ø±ÕFirewalld ºÍ iptables
# systemctl stop firewalld# systemctl disable firewalld# systemctl status firewalld# iptables -F3 ÅäÖÃ yum Ô´
# mv /etc/yum.repos.d/Cent* /tmp# vim /etc/yum.repos.d/CentOS7.reponame=aliyun-osbaseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/enabled=1gpgcheck=0name=aliyun-epelbaseurl=https://mirrors.aliyun.com/epel/7/x86_64/enabled=1gpgcheck=0name=aliyun-extrabaseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/enabled=1gpgcheck=0# yum clean all && yum makecacheÌí¼Ó epel Ô´
# yum install epel-release -yÌí¼Ó docker-ce Ô´
# yum install -y yum-utils# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo# cat /etc/yum.repos.d/docker-ce.repo name=Docker CE Stable - $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/stableenabled=1gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Stable - Debuginfo $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-$basearch/stableenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Stable - Sourcesbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/stableenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Edge - $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/edgeenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Edge - Debuginfo $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-$basearch/edgeenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Edge - Sourcesbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/edgeenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Test - $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/testenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Test - Debuginfo $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-$basearch/testenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Test - Sourcesbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/testenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Nightly - $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/nightlyenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Nightly - Debuginfo $basearchbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/debug-$basearch/nightlyenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpgname=Docker CE Nightly - Sourcesbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/source/nightlyenabled=0gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg# yum clean all && yum makecache4 ÅäÖÃ hostname
# vim /etc/hostnameDocker5 ÅäÖÃ/etc/hosts
# vim /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhostlocaldomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.10.7 Docker# ping $HOSTNAME6 ͬ²½Ê±¼ä
# find / -name Shanghai/usr/share/zoneinfo/Asia/Shanghai/usr/share/zoneinfo/posix/Asia/Shanghai/usr/share/zoneinfo/right/Asia/Shanghai# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime cp: overwrite ¡®/etc/localtime¡¯? y# yum install -y ntp ntpdate# systemctl enable ntpd# systemctl start ntpd# ntpdate cn.pool.ntp.org# ntpdate 0.rhel.pool.ntp.orgÊÖ¶¯¸Äʱ¼ä£º date -s "2019-09-09 19:19"7 ÅäÖà pip ¾µÏñÔ´£¬·½±ã¿ìËÙÏÂÔØpython¿â£¨ÕâÒ»²½ºÜÖØÒª£©
# mkdir /.pip# vim/.pip/pip.conf#дÈëÏÂÒÔÄÚÈÝindex-url = http://mirrors.aliyun.com/pypi/simple/trusted-host=mirrors.aliyun.com8ÅäÖÃÍø¿¨ÐÅÏ¢
# vim /etc/sysconfig/network-scripts/ifcfg-ens33 TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noNAME=ens33DEVICE=ens33ONBOOT=yesIPADDR=192.168.10.7GATEWAY=192.168.10.2NETMASK=255.255.255.0×ܽá
ÒÔÉϵIJÙ×÷¾ÍÊÇ CentOS7 ϵͳ»·¾³ÅäÖõĹý³Ì£¬Îª°²×° Docker ×öºÃ×¼±¸¡£Ïë¿´Ôõô°²×° Docker µÄÅóÓÑÇë³ÖÐø¹Ø×¢ÎÒµÄÎÄÕ£¬Ï£ÍûÎÒµÄÎÄÕÂÄܸø´ó¼Ò´øÀ´°ïÖú¡£
666 {:6_267:}{:6_267:}{:6_267:} ¿´¿´ºÃºÃѧϰ
{:6_269:}{:6_269:}{:6_269:}{:6_269:} ŒWÁ•ŒWÁ•£¬¸ÐÖx˜ÇÖ÷µÄ·ÖÏí£¡ ¸Ðл¥Ö÷·ÖÏí
Ò³:
[1]