当前位置: 首页 > news >正文

建设银行甘肃兰州分行网站爱范儿 wordpress 主题

建设银行甘肃兰州分行网站,爱范儿 wordpress 主题,php主做哪种类型网站,蚌埠市建设工程质监站网站OpenStack 创建自定义的QCOW2格式镜像 前言 建议虚机网络配置为 NAT 或 桥接#xff0c;因为未来 KVM虚机 需要借助 虚机 的外网能力进行联网安装软件包 虚机在启动前#xff0c;必须在 VMware Workstation 上为其开启虚拟化引擎 虚拟化 Intel VT-x/EPT 或 AMD-V 安装kvm …OpenStack 创建自定义的QCOW2格式镜像 前言 建议虚机网络配置为 NAT 或 桥接因为未来 KVM虚机 需要借助 虚机 的外网能力进行联网安装软件包 虚机在启动前必须在 VMware Workstation 上为其开启虚拟化引擎 虚拟化 Intel VT-x/EPT 或 AMD-V 安装kvm 虚拟机安装虚拟化软件包 # 挂载光盘 [rootlocalhost ~]# mount /dev/cdrom /mnt mount: /dev/sr0 is write-protected, mounting read-only [rootlocalhost ~]# ls /mnt/ CentOS_BuildTag GPL LiveOS RPM-GPG-KEY-CentOS-7 EFI images Packages RPM-GPG-KEY-CentOS-Testing-7 EULA isolinux repodata TRANS.TBL# 配置本地YUM源 [rootlocalhost ~]# cd /etc/yum.repos.d/ [rootlocalhost yum.repos.d]# ls CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo CentOS-Debuginfo.repo CentOS-Sources.repo [rootlocalhost yum.repos.d]# mkdir bak [rootlocalhost yum.repos.d]# mv *.repo bak/ [rootlocalhost yum.repos.d]# ls bak [rootlocalhost yum.repos.d]# vim source.repo [rootlocalhost yum.repos.d]# cat source.repo [source] name source baseurl file:///mnt/ gpgcheck 0 [rootlocalhost yum.repos.d]# yum clean all [rootlocalhost yum.repos.d]# yum repolist all# 安装虚拟化软件包及虚拟机镜像管理工具 [rootlocalhost ~]# yum grouplist Loaded plugins: fastestmirror, langpacks There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile source | 3.6 kB 00:00:00 (1/2): source/group_gz | 153 kB 00:00:00 (2/2): source/primary_db | 3.3 MB 00:00:00 Available Environment Groups:Minimal InstallCompute NodeInfrastructure ServerFile and Print ServerBasic Web ServerVirtualization HostServer with GUIGNOME DesktopKDE Plasma WorkspacesDevelopment and Creative Workstation Available Groups:Compatibility LibrariesConsole Internet ToolsDevelopment ToolsGraphical Administration ToolsLegacy UNIX CompatibilityScientific SupportSecurity ToolsSmart Card SupportSystem Administration ToolsSystem Management Done [rootlocalhost ~]# yum groupinstall -y Virtualization* [rootlocalhost ~]# yum install -y libguestfs-tools-c.x86_64创建kvm虚拟机 # 创建目录上传ISO镜像 [rootlocalhost ~]# mkdir /iso [rootlocalhost ~]# cd /iso/ # 将 CentOS7镜像 上传到 /iso 目录下 [rootlocalhost iso]# ls CentOS-7-x86_64-DVD-2009.iso# 创建 kvm虚拟机 使用的磁盘文件 [rootlocalhost iso]# qemu-img create -f qcow2 /iso/centos7.qcow2 15G Formatting /iso/centos7.qcow2, fmtqcow2 size16106127360 encryptionoff cluster_size65536 lazy_refcountsoff # 创建 kvm 虚拟机 [rootlocalhost ~]# virt-install \ --name centos7 \ --disk path/iso/centos7.qcow2 \ --vcpus 1 \ --memory 2048 \ --location /iso/CentOS-7-x86_64-DVD-2009.iso \ --network networkdefault安装kvm虚拟机 语言选择 自动分区 网络及主机名 注意当开启网络后必须可以通过 DHCP 自动获取到 IP 地址如下图 配置ROOT密码 默认采用最小化 minimal 安装 重启并测试网络 重启 kvm 创建的虚拟机并以 root 身份登录测试 kvm 虚机 能否连通外网 配置KVM虚拟机 修改KVM虚拟机网络配置文件 注意是 kvm 创建的虚拟机 # 修改 kvm 虚拟机网卡配置文件使其只包括以下 4 行内容 [rootlocalhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens3 [rootlocalhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens3 TYPEEthernet BOOTPROTOdhcp DEVICEens3 ONBOOTyes安装 cloud-int 软件包 根据 上边 测试kvm 虚机可正常连通外网此时直接在线安装软件包即可。目的是为了可以获取到客户自定义元数据信息如主机名及root密码等。 [rootlocalhost ~]# yum install -y cloud-utils-growpart cloud-init Loaded plugins: fastestmirror Determining fastest mirrors* base: mirrors.bfsu.edu.cn* extras: mirrors.jlu.edu.cn* updates: mirrors.jlu.edu.cn base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/4): base/7/x86_64/group_gz | 153 kB 00:00:00 (2/4): extras/7/x86_64/primary_db | 250 kB 00:00:00 (3/4): base/7/x86_64/primary_db | 6.1 MB 00:00:00 (4/4): updates/7/x86_64/primary_db | 22 MB 00:00:01 ................................................. Complete! 编辑 cloud.cfg 文件 编辑 /etc/cloud/cloud.cfg 配置文件在 cloud_init_modules 下添加以下内容 #添加内容 - resolv-conf# 最终配置文件效果 [rootlocalhost ~]# vi /etc/cloud/cloud.cfg [rootlocalhost ~]# cat /etc/cloud/cloud.cfg users:- defaultdisable_root: 1 ssh_pwauth: 0mount_default_fields: [~, ~, auto, defaults,nofail,x-systemd.requirescloud-init.service, 0, 2] resize_rootfs_tmp: /dev ssh_deletekeys: 1 ssh_genkeytypes: ~ syslog_fix_perms: ~ disable_vmware_customization: falsecloud_init_modules:- disk_setup- migrator- bootcmd- write-files- growpart- resizefs- set_hostname- update_hostname- update_etc_hosts- rsyslog- users-groups- ssh- resolv-conf ## 在这cloud_config_modules:- mounts- locale- set-passwords- rh_subscription- yum-add-repo- package-update-upgrade-install- timezone- puppet- chef- salt-minion- mcollective- disable-ec2-metadata- runcmdcloud_final_modules:- rightscale_userdata- scripts-per-once- scripts-per-boot- scripts-per-instance- scripts-user- ssh-authkey-fingerprints- keys-to-console- phone-home- final-message- power-state-changesystem_info:default_user:name: centoslock_passwd: truegecos: Cloud Usergroups: [adm, systemd-journal]sudo: [ALL(ALL) NOPASSWD:ALL]shell: /bin/bashdistro: rhelpaths:cloud_dir: /var/lib/cloudtemplates_dir: /etc/cloud/templatesssh_svcname: sshd# vim:syntaxyaml 编辑network文件 编辑 /etc/sysconfig/network 配置文件使其包含以下内容避免访问 EC2 元数据服务时出现问题。 #添加内容 NOZEROCONFyes# 最终配置文件效果 [rootlocalhost ~]# vi /etc/sysconfig/network [rootlocalhost ~]# cat /etc/sysconfig/network # Created by anaconda NOZEROCONFyes# 执行命令使参数生效 [rootlocalhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-1160.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-ccaf1e6485aa46c3868726e2bb360253 Found initrd image: /boot/initramfs-0-rescue-ccaf1e6485aa46c3868726e2bb360253.img done 编辑 grub文件 编辑 /etc/default/grub 配置文件使其包含以下引导选项内容为了确保控制台的信息出现在 dashboard 的日志标签页中以及 nova console-log 日志的输出内容中。 #添加内容 GRUB_CMDLINE_LINUX_DEFAULTconsoletty0 consolettyS0,115200n8# 最终配置文件效果 [rootlocalhost ~]# vi /etc/default/grub [rootlocalhost ~]# cat /etc/default/grub GRUB_TIMEOUT5 GRUB_DISTRIBUTOR$(sed s, release .*$,,g /etc/system-release) GRUB_DEFAULTsaved GRUB_DISABLE_SUBMENUtrue GRUB_TERMINAL_OUTPUTconsole GRUB_CMDLINE_LINUXcrashkernelauto rd.lvm.lvcentos/root rd.lvm.lvcentos/swap rhgb quiet GRUB_CMDLINE_LINUX_DEFAULTconsoletty0 consolettyS0,115200n8 GRUB_DISABLE_RECOVERYtrue 关闭KVM虚拟机 [rootlocalhost ~]# init 0创建QCOW2镜像 注意以下步骤在 虚拟机 中操作不是 kvm 虚拟机 重置并清理镜像 [rootlocalhost ~]# virsh list --allId Name State ----------------------------------------------------- centos7 shut off[rootlocalhost ~]# virt-sysprep -d centos7 [ 0.0] Examining the guest ... [ 8.8] Performing abrt-data ... [ 8.8] Performing backup-files ... [ 9.5] Performing bash-history ... [ 9.6] Performing blkid-tab ... [ 9.6] Performing crash-data ... [ 9.6] Performing cron-spool ... [ 9.6] Performing dhcp-client-state ... [ 9.6] Performing dhcp-server-state ... [ 9.6] Performing dovecot-data ... [ 9.6] Performing logfiles ... [ 9.6] Performing machine-id ... [ 9.7] Performing mail-spool ... [ 9.7] Performing net-hostname ... [ 9.7] Performing net-hwaddr ... [ 9.7] Performing pacct-log ... [ 9.7] Performing package-manager-cache ... [ 9.7] Performing pam-data ... [ 9.7] Performing passwd-backups ... [ 9.7] Performing puppet-data-log ... [ 9.7] Performing rh-subscription-manager ... [ 9.7] Performing rhn-systemid ... [ 9.7] Performing rpm-db ... [ 9.7] Performing samba-db-log ... [ 9.7] Performing script ... [ 9.7] Performing smolt-uuid ... [ 9.8] Performing ssh-hostkeys ... [ 9.8] Performing ssh-userdir ... [ 9.8] Performing sssd-db-log ... [ 9.8] Performing tmp-files ... [ 9.8] Performing udev-persistent-net ... [ 9.8] Performing utmp ... [ 9.8] Performing yum-uuid ... [ 9.8] Performing customize ... [ 9.8] Setting a random seed [ 9.8] Setting the machine ID in /etc/machine-id [ 9.8] Performing lvm-uuids ... 创建并压缩镜像 # 查找 centos 实例对应的磁盘文件 [rootlocalhost ~]# virsh domblklist centos7 Target Source ------------------------------------------------ hda /iso/centos7.qcow2 hdb -# 创建并清理压缩镜像 [rootlocalhost ~]# virt-sparsify --compress /iso/centos7.qcow2 /tmp/centos7-cloud.qcow2 [ 0.0] Create overlay file in /tmp to protect source disk [ 0.1] Examine source disk [ 1.8] Fill free space in /dev/centos/root with zero100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00 [ 14.7] Clearing Linux swap on /dev/centos/swap [ 15.6] Fill free space in /dev/sda1 with zero [ 17.1] Copy to destination and make sparse [ 73.5] Sparsify operation completed with no errors. virt-sparsify: Before deleting the old disk, carefully check that the target disk boots and works correctly. 测试镜像启动 注册镜像 将镜像 centos-cloud.qcow2 注册到 OpenStack 平台 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-FkX5NFX4-1693186720941)(./assets/image-20230819223145255.png)] [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-xsHpmi7t-1693186720941)(./assets/image-20230819223211819.png)] 创建云主机类型规格 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PCuQXjMm-1693186720941)(./assets/image-20230819223259314.png)] [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-UC9OIFyD-1693186720941)(./assets/image-20230819223322384.png)] 开启添加ROOT密码 开启添加 ROOT 密码后可通过命令行或 WebUI 界面进行 root 密码自定义 控制节点 在 /etc/openstack-dashboard/local_settings 文件中把 can_set_password 参数的值设为 True [rootcontroller ~]# vim /etc/openstack-dashboard/local_settings ... can_set_password: True ...在/etc/nova/nova.conf 文件中把 inject_password 参数的值设为 True [rootcontroller ~]# vim /etc/nova/nova.conf ... can_set_password: True ...重启服务 [rootcontroller ~]# systemctl restart openstack-nova-compute.service [rootcontroller ~]# systemctl restart httpd.service 计算节点 在计算节点上的 /etc/nova/nova.conf 文件中把 inject_password 参数的值设为 True [rootcomputer ~]# vim /etc/nova/nova.conf ... inject_passwordtrue ...重启服务 [rootcomputer ~]# systemctl restart openstack-nova-compute.service 发放云主机测试 注意网络及路由需存在务必保证路由及网关存在否则无法获取到客户自定义主机名 观察启动流程及尝试登录测试镜像正确无误
http://www.dnsts.com.cn/news/81274.html

相关文章:

  • 北京网站优化推广分析美术馆网站建设总体要求
  • 网站前台维护放弃wordpress
  • 网站内容的排版布局制作网页时用什么实现动态效果
  • 有什么网站专做买生活污水设备苍南规划建设局网站
  • 镇江市扬中市做网站花垣网站建设
  • 西安h5响应式网站东莞广告公司有哪些
  • 上海青浦做网站天津河西做网站贵吗
  • 珠海特价做网站太原网站优化技术
  • 国外免费psd网站线上活动方案策划
  • 上海网站建设的价格低wordpress改中文版
  • 网站推广朋友圈文案网站建设和维护合同
  • 做拼多多网站免费课程新乡 网站开发
  • 常规网站建设内容大连房地产网站建设
  • 福州建站网络公司如何自定义wordpress的登录页面
  • php购物网站开发开发多久孝感做网站的公司
  • 韩国唯美网站设计21世纪上海人才网官网
  • 广西省建设厅官方网站河南做网站公司
  • 网站定制开发流程企业网页设计制作
  • 信息课做动漫网站淘宝券商城网站制作
  • 西安有关做网站的公司有哪些wordpress 批量替换
  • 网站推广网站制作网站建设公司个人微网站怎么做
  • 58网站怎么做品牌推广厦门 外贸网站
  • 空包网站怎么建设下载软件的网站
  • 邯郸做网站推广多少钱房产系统平台
  • 免费网站推广工具有哪些企业管理培训视频免费
  • 北京网站建设方案品牌公司网站打模块
  • 网络设计网站南通网站维护
  • 重庆多语网站建设品牌企业自己使用原生php做网站性能
  • 天津网站开发网站南宁网站改版
  • 关于网站建设的大学做微信平台网站