/usr/local/qcloud/python 디렉터리에 설치되며 시스템의 기본 python과 충돌하지 않습니다.유형 | OS | 버전 | x86_64 | arm64 | ||
| | | qcloud-python | cloud-init | qcloud-python | cloud-init |
rpm | CentOS | 7 | ||||
| | 8 | ||||
| Fedora | 36 | NA | NA | ||
| Kylin | 20sp1 | ||||
| openSUSE | 15.4 | NA | NA | ||
deb | Debian | 11 | ||||
| | 10 | NA | NA | ||
| | 9 | NA | NA | ||
| | 8 | NA | NA | ||
| Ubuntu | 22.04 | NA | NA | ||
| | 20.04 | ||||
| | 18.04 | ||||
| | 16.04 | NA | NA | ||
rm -rf /var/lib/cloudrm -rf /etc/cloudrm -rf /usr/local/bin/cloud*
dpkg -i *.deb
rpm -ivh *.rpm
cloud-init qcloud -v/usr/bin/cloud-init qcloud 0011
wget https://gerryguan-1306210569.cos.ap-chongqing.myqcloud.com/cloud-init/src/cloud-init-20.1.0011.tar.gz
tar -zxvf cloud-init-20.1.0011.tar.gz
cd cloud-init
yum install python3-pip -y
apt-get -y install python3-pip
python3 -m pip install --upgrade pip
pip install 'requests<2.20.0' 명령어를 실행하여 requests 2.20.0 이하 버전을 설치하시기 바랍니다.pip3 install -r requirements.txt
yum install cloud-utils-growpart dracut-modules-growroot -ydracut -f
yum install cloud-utils-growpart -y
apt-get install cloud-guest-utils -y
python3 setup.py build
python3 setup.py install --init-system systemd
/etc/cloud/cloud.cfg의 콘텐츠를 다운로드한 cloud.cfg 파일의 콘텐츠로 대체합니다.useradd syslog
strings /sbin/init | grep "/lib/system" 명령을 수행할 수 있습니다. 반환되는 메시지가 있을 경우 운영 체제는 systemd 자동 실행 관리 서비스입니다.ln -s /usr/local/bin/cloud-init /usr/bin/cloud-init
systemctl enable cloud-init-local.servicesystemctl start cloud-init-local.servicesystemctl enable cloud-init.servicesystemctl start cloud-init.servicesystemctl enable cloud-config.servicesystemctl start cloud-config.servicesystemctl enable cloud-final.servicesystemctl start cloud-final.servicesystemctl status cloud-init-local.servicesystemctl status cloud-init.servicesystemctl status cloud-config.servicesystemctl status cloud-final.service
[Unit]Description=Initial cloud-init job (pre-networking)Wants=network-pre.targetAfter=systemd-remount-fs.serviceBefore=NetworkManager.serviceBefore=network-pre.targetBefore=shutdown.targetConflicts=shutdown.targetRequiresMountsFor=/var/lib/cloud[Service]Type=oneshotExecStart=/usr/bin/cloud-init init --localExecStart=/bin/touch /run/cloud-init/network-config-readyRemainAfterExit=yesTimeoutSec=0# Output needs to appear in instance console outputStandardOutput=journal+console[Install]WantedBy=cloud-init.target
[Unit]Description=Initial cloud-init job (metadata service crawler)Wants=cloud-init-local.serviceWants=sshd-keygen.serviceWants=sshd.serviceAfter=cloud-init-local.serviceAfter=systemd-networkd-wait-online.serviceAfter=networking.serviceAfter=systemd-hostnamed.serviceBefore=network-online.targetBefore=sshd-keygen.serviceBefore=sshd.serviceBefore=systemd-user-sessions.serviceConflicts=shutdown.target[Service]Type=oneshotExecStart=/usr/bin/cloud-init initRemainAfterExit=yesTimeoutSec=0# Output needs to appear in instance console outputStandardOutput=journal+console[Install]WantedBy=cloud-init.target
strings /sbin/init | grep "sysvinit" 명령을 수행할 수 있습니다. 반환되는 메시지가 있을 경우 운영 체제는 sysvinit 자동 실행 관리 서비스입니다.chkconfig --add cloud-init-localchkconfig --add cloud-initchkconfig --add cloud-configchkconfig --add cloud-finalchkconfig cloud-init-local onchkconfig cloud-init onchkconfig cloud-config onchkconfig cloud-final on
apt-get/yum install cloud-init
/etc/cloud/cloud.cfg의 콘텐츠를 다운로드한 cloud.cfg 파일의 콘텐츠로 대체합니다.cloud-init init --local
Cloud-init v. 20.1.0011 running 'init-local' at Fri, 01 Apr 2022 01:26:11 +0000. Up 38.70 seconds.
rm -rf /var/lib/cloud
rm -rf /etc/network/interfaces.d/50-cloud-init.cfg
/etc/network/interfaces을 다음 콘텐츠로 수정해야 합니다.# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).source /etc/network/interfaces.d/*
yum install epel-release -y
yum install python3-pip -y
apt-get clean all
apt-get update -y
apt-get -y install python3-pip
피드백