ÉèΪÊ×Ò³Êղر¾Õ¾language¡ú¡ú ÓïÑÔÇл»

ºèðÀÂÛ̳

 ÕÒ»ØÃÜÂë
 ÂÛ̳ע²á

QQ怬

ÏÈ×¢²áÔÙ°ó¶¨QQ

²é¿´: 8527|»Ø¸´: 6
ÊÕÆð×ó²à

Docker ʵս֮ CentOS7 ϵͳ»·¾³ÅäÖÃ

[¸´ÖÆÁ´½Ó]
·¢±íÓÚ 2021-4-3 15:42:07 | ÏÔʾȫ²¿Â¥²ã |ÔĶÁģʽ
±¾ÎĵµÏêϸ½éÉÜ 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ºÍ·À»ðǽ
[root@Docker ]# vim /etc/selinux/configSELINUX=disabled[root@Docker ]# setenforce 0[root@Docker ]# getenforcePermissive2 ¹Ø±ÕFirewalld ºÍ iptables
[root@Docker ]# systemctl stop firewalld[root@Docker ]# systemctl disable firewalld[root@Docker ]# systemctl status firewalld[root@Docker ]# iptables -F3 ÅäÖÃ yum Ô´
[root@Docker ]# mv /etc/yum.repos.d/Cent* /tmp[root@Docker ]# vim /etc/yum.repos.d/CentOS7.repo[aliyun-os]name=aliyun-osbaseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/enabled=1gpgcheck=0[aliyun-epel]name=aliyun-epelbaseurl=https://mirrors.aliyun.com/epel/7/x86_64/enabled=1gpgcheck=0[aliyun-extra]name=aliyun-extrabaseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/enabled=1gpgcheck=0[root@Docker ]# yum clean all && yum makecacheÌí¼Ó epel Ô´
[root@Docker ]# yum install epel-release -yÌí¼Ó docker-ce Ô´
[root@Docker ]# yum install -y yum-utils[root@Docker ]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo[root@Docker ]# cat /etc/yum.repos.d/docker-ce.repo [docker-ce-stable]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/gpg[docker-ce-stable-debuginfo]name=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/gpg[docker-ce-stable-source]name=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/gpg[docker-ce-edge]name=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/gpg[docker-ce-edge-debuginfo]name=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/gpg[docker-ce-edge-source]name=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/gpg[docker-ce-test]name=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/gpg[docker-ce-test-debuginfo]name=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/gpg[docker-ce-test-source]name=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/gpg[docker-ce-nightly]name=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/gpg[docker-ce-nightly-debuginfo]name=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/gpg[docker-ce-nightly-source]name=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[root@Docker ]# yum clean all && yum makecache4 ÅäÖÃ hostname
[root@Docker ]# vim /etc/hostnameDocker5 ÅäÖÃ/etc/hosts
[root@Docker ]# vim /etc/hosts127.0.0.1   localhost localhost.localdomain localhost4 localhostlocaldomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.10.7 Docker[root@Docker ]# ping $HOSTNAME6 ͬ²½Ê±¼ä
[root@Docker ]# find / -name Shanghai/usr/share/zoneinfo/Asia/Shanghai/usr/share/zoneinfo/posix/Asia/Shanghai/usr/share/zoneinfo/right/Asia/Shanghai[root@Docker ]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime cp: overwrite ¡®/etc/localtime¡¯? y[root@Docker ]# yum install -y ntp ntpdate[root@Docker ]# systemctl enable ntpd[root@Docker ]# systemctl start ntpd[root@Docker ]# ntpdate cn.pool.ntp.org[root@Docker ]# ntpdate 0.rhel.pool.ntp.org

ÊÖ¶¯¸Äʱ¼ä£º date -s "2019-09-09 19:19"

7 ÅäÖà pip ¾µÏñÔ´£¬·½±ã¿ìËÙÏÂÔØpython¿â£¨ÕâÒ»²½ºÜÖØÒª£©
[root@Docker ]# mkdir /.pip[root@Docker ]# vim  /.pip/pip.conf  #дÈëÏÂÒÔÄÚÈÝ[global]index-url = http://mirrors.aliyun.com/pypi/simple/[install]trusted-host=mirrors.aliyun.com8  ÅäÖÃÍø¿¨ÐÅÏ¢
[root@Docker ]# 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 µÄÅóÓÑÇë³ÖÐø¹Ø×¢ÎÒµÄÎÄÕ£¬Ï£ÍûÎÒµÄÎÄÕÂÄܸø´ó¼Ò´øÀ´°ïÖú¡£


·¢±íÓÚ 2022-1-19 15:48:21 | ÏÔʾȫ²¿Â¥²ã
¿´¿´ºÃºÃѧϰ
µØ°å 2022-1-19 15:48:21 »Ø¸´ ÊÕÆð»Ø¸´
·¢±íÓÚ 2023-11-1 10:06:08 | ÏÔʾȫ²¿Â¥²ã
ŒWÁ•ŒWÁ•£¬¸ÐÖx˜ÇÖ÷µÄ·ÖÏí£¡
6# 2023-11-1 10:06:08 »Ø¸´ ÊÕÆð»Ø¸´
·¢±íÓÚ 2024-9-13 16:36:28 | ÏÔʾȫ²¿Â¥²ã
¸Ðл¥Ö÷·ÖÏí
7# 2024-9-13 16:36:28 »Ø¸´ ÊÕÆð»Ø¸´
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | ÂÛ̳ע²á

±¾°æ»ý·Ö¹æÔò

QQ|Archiver|ÊÖ»ú°æ|СºÚÎÝ|sitemap|ºèðÀÂÛ̳ ( ¾©ICP±¸14027439ºÅ )  

GMT+8, 2024-11-21 16:48 , Processed in 0.055970 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí