zoukankan      html  css  js  c++  java
  • 制作openstack Centos image

    安装centos7.4 存储使用基本安装
    关闭防火墙
    systemctl disable firewalld
    关闭selinux
     
    [root@GuoZhenHui ~]# cat /etc/sysconfig/selinux
    SELINUX=disabled
    配置获取元数据
    一个实例必须与元数据服务进行交互任务后再启动。 例如:必须得到实例 ssh公钥并运行脚本的用户数据。 为了确保实例执行这些任务,推荐安装一个cloud-init包。
    使用cloud-init获取公钥,cloud-init包将从元数据服务器和一个帐户的关键的地方自动获取公钥 。
    安装cloud-init。
    yum -y install cloud-init
    安装cloud-utils-growpart允许分区调整
     
    yum -y install cloud-utils-growpart
     
    实例需要访问元数据服务, 必须禁用默认zeroconf路线。
    echo "NOZEROCONF=yes" >> /etc/sysconfig/network
     
    配置控制台
    如果希望在仪表盘界面查看nova控制台的日志,需要做以下配置:
    vi /etc/default/grub
    GRUB_CMDLINE_LINUX="crashkernel=auto console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0"
     
    更新grub
    grub2-mkconfig -o /boot/grub2/grub.cfg
     
    cat /etc/cloud/cloud.cfg
     
    users:
    - default
     
    disable_root: 0
    ssh_pwauth: 1
    hostname www
     
    locale_configfile: /etc/sysconfig/i18n
    mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
    resize_rootfs_tmp: /dev
    ssh_deletekeys: 0
    ssh_genkeytypes: ~
    syslog_fix_perms: ~
     
    cloud_init_modules:
    - migrator
    - bootcmd
    - write-files
    - growpart
    - resizefs
    - set_hostname
    # - update_hostname
    - update_etc_hosts
    - rsyslog
    - users-groups
    - ssh
     
    cloud_config_modules:
    - mounts
    - locale
    - set-passwords
    - yum-add-repo
    - package-update-upgrade-install
    - timezone
    - puppet
    - chef
    - salt-minion
    - mcollective
    - disable-ec2-metadata
    - runcmd
     
    cloud_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
     
    system_info:
    default_user:
    name: centos
    lock_passwd: true
    gecos: Cloud User
    groups: [wheel, adm, systemd-journal]
    sudo: ["ALL=(ALL) NOPASSWD:ALL"]
    shell: /bin/bash
    distro: rhel
    paths:
    cloud_dir: /var/lib/cloud
    templates_dir: /etc/cloud/templates
    ssh_svcname: sshd
     
    # vim:syntax=yaml
     
     
    删除MAC地址,改为dhcp获取
    rm /etc/udev/rules.d/70-persistent-ipoib.rules
  • 相关阅读:
    WinowsXP 任务栏无法显示当前运行程序图标
    日志记录组件[Log4net]详细介绍(转)
    桌面上的IE图标变成了快捷方式那种图标 怎么还原回来
    面试必须要知道的SQL语法,语句(转载)
    兼容 火狐 IE 的JS时间控件 任意格式 年月日时分秒
    Nagios远程监控软件的安装与配置详解(1)
    linux集群 负载均衡实验笔记
    PHPB2B 模板 标签
    PHP 去除 HTML 回车 换行 空格
    OpenX参考网址
  • 原文地址:https://www.cnblogs.com/zhanghn8/p/11278261.html
Copyright © 2011-2022 走看看