制作rhe7.3

编程入门 行业动态 更新时间:2024-10-12 03:24:04

制作rhe7.3

制作rhe7.3



1、ip、dns、



2、repo


3、


yum install python-setuptools python-cheetah python-six python-jsonpatch python-requests python-yaml / PyYAML python-configobj python-oauthlib python-prettytable python-jinja2 python-markdown  --nogpgcheck -y


yum install python2-jsonschema.noarch  --nogpgcheck -y


wget .1/+download/cloud-init-17.1.tar.gz


tar -xvf cloud-init-17.1.tar.gz


cd ./cloud-init-17.1
python setup.py build
python setup.py install --init-system systemd




wget .cfg?_ga=1.128970569.434046064.1510539882


cp centos-cloud.cfg /etc/cloud/cloud.cfg


useradd syslog


systemctl enable cloud-init-local.service
systemctl start cloud-init-local.service
systemctl enable cloud-init.service
systemctl start cloud-init.service
systemctl enable cloud-config.service
systemctl start cloud-config.service
systemctl enable cloud-final.service
systemctl start cloud-final.service


systemctl status cloud-init-local.service
systemctl status cloud-init.service
systemctl status cloud-config.service
systemctl status cloud-final.service






centos 操作系统特殊执行


将 /lib/systemd/system/cloud-init-local.service 文件内容替换为如下:
[Unit]
Description=Initial cloud-init job (pre-networking)
Wants=network-pre.target
After=systemd-remount-fs.service
Before=NetworkManager.service
Before=network-pre.target
Before=shutdown.target
Conflicts=shutdown.target
RequiresMountsFor=/var/lib/cloud


[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init init --local
ExecStart=/bin/touch /run/cloud-init/network-config-ready
RemainAfterExit=yes
TimeoutSec=0


# Output needs to appear in instance console output
StandardOutput=journal+console


[Install]
WantedBy=cloud-init.target






将 /lib/systemd/system/cloud-init.service 文件内容替换为如下:
[Unit]
Description=Initial cloud-init job (metadata service crawler)
Wants=cloud-init-local.service
Wants=sshd-keygen.service
Wants=sshd.service
After=cloud-init-local.service
After=systemd-networkd-wait-online.service
After=networking.service
After=systemd-hostnamed.service
Before=network-online.target
Before=sshd-keygen.service
Before=sshd.service
Before=systemd-user-sessions.service
Conflicts=shutdown.target


[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init init
RemainAfterExit=yes
TimeoutSec=0


# Output needs to appear in instance console output
StandardOutput=journal+console


[Install]
WantedBy=cloud-init.target












vi ~/.bash_history


:%d








三、安装完之后关机,保存相应.cow2文件即可。


*注:执行完成后请勿重启服务器,否则需重新执行下以下操作。*
cloud-init init --local
rm -rf /var/lib/cloud

更多推荐

制作rhe7.3

本文发布于:2024-02-25 13:05:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1699064.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!