1、[ ~]# systemctl stop NetworkManager

     [ ~]# systemctl enable NetworkManager

     [ ~]# systemctl stop firewalld

     [ ~]# systemctl enable firewalld

     [ ~]#vim /etc/selinux/config

    将SELINUX=enforcing改为SELINUX=disabled

     getenforce

     setenforce  0  (临时关闭)

2、[ ~]#yum install   

     [ ~]#yum repolist

     [ ~]#yum -y install openstack-packstack 

3、重启服务器 #reboot   (shutdown -r now)

4、[ ~]#yum install ntp

     [ ~]# systemctl start ntpd

    [ ~]# chkconfig ntpd on

     [ ~]# vim /etc/ntp.conf

     增加:server 202.120.2.101

     [ ~]# ntpdate 202.120.2.101  (上海交通大学时间服务器)

5、[ ~]#packstack --gen-answer-file /root/answers.txt

     [ ~]#vim  /root/answers.txt

    修改参数:

        CONFIG_PROVISION_DEMO=n

        CONFIG_CINDER_VOLUMES_CREATE=n

        CONFIG_KEYSTONE_ADMIN_PW=redhat  (修改登录密码)

        CONFIG_HORIZON_SSL=y         (图像化管理界面的安装)

6、 [ ~]#packstack --allinone

或者:#packstack --answer-file /root/answers.txt

48D6630A58034944B1B828F0504CE8B5

 7、[ ~]# openstack-status

在浏览器中输入服务器的IP地址及可访问。

62F83604EEF745C38BD6DA0A4C4F20F3

8、镜像文件路径:

[ ~]# ll /var/lib//glance/images/

total 6709760

-rw-r----- 1 glance glance 3100639232 Jun 24 06:21 0b0de83b-d817-496e-8aec-f874d8963624

-rw-r----- 1 glance glance 3770155008 Jun 24 05:26 cf1d6df4-bfa1-4835-b96c-cf829bd2ee5e

[ ~]# 

9、脚本:

#vim /tmp/customized.sh

echo "Time to eat!" >> /etc/motd

chmod a+x  /tmp/customized.sh

10、镜像地址: