首页 > 代码库 > openstack前期准备

openstack前期准备

1. 两台虚拟机,安装Centos7系统    两个网卡 -- 一个NAT模式,一个仅主机模式    两个硬盘 -- 一个20GB,一个50GB    内存 -- 主 2.6GB(根据自己的配置,大于2G即可)                从 1.6 GB2. 配置网络 (参照博文 ”Centos7 配置网络)3. 关闭 selinux ,关闭iptables(两台机器都要操作)//在Centos7 ,firewalld就是iptables[root@slave ~]# setenforce 0[root@slave ~]# vi /etc/selinux/config[root@master ~]# systemctl stop firewalld[root@master ~]# systemctl disable firewalldrm /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.servicerm /etc/systemd/system/basic.target.wants/firewalld.service4. 关闭NetworkManager(两台机器都要操作)[root@master ~]# systemctl stop NetworkManager[root@master ~]# systemctl disable NetworkManagerrm /etc/systemd/system/multi-user.target.wants/NetworkManager.servicerm /etc/systemd/system/dbus-org.freedesktop.NetworkManager.servicerm /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service

 

/* 定义密码 *//* 在部署openstack过程 ,会有很多地方使用到密码 。    为了方便管理和安全,可以先定义好密码 ,利用mkpasswd生成随机字符串 */(两台机器都安装)[root@master ~]# yum install -y expect[root@master ~]# mkpasswd -s 0        //生成随机字符串/* 范本 */Database password (no variable used)    Root password for the database   tn1Pi6YtmADMIN_PASS    Password of user admin    3qiVpzU2xCEILOMETER_DBPASS    Database password for the Telemetry service  Czn3bF1hmCEILOMETER_PASS    Password of Telemetry service user ceilometer  abquh12GU CINDER_DBPASS    Database password for the Block Storage service O3bwbpoZ3CINDER_PASS    Password of Block Storage service user cinder  hf8LX9bowDASH_DBPASS    Database password for the dashboard  5qBZxnn1gDEMO_PASS    Password of user demo   9TtbgaA1qGLANCE_DBPASS    Database password for Image service  Zznky4tP0GLANCE_PASS    Password of Image service user glance   Wuyaf4cV6HEAT_DBPASS    Database password for the Orchestration service  b7Fk5wjLgHEAT_DOMAIN_PASS    Password of Orchestration domain  7Gotb3eoHHEAT_PASS    Password of Orchestration service user heat  eqQ2jLgz0KEYSTONE_DBPASS    Database password of Identity service  f6zx0gURvNEUTRON_DBPASS    Database password for the Networking service   quidyOC50NEUTRON_PASS    Password of Networking service user neutron  mdcGVl29iNOVA_DBPASS    Database password for Compute service RYgv0rg7pNOVA_PASS    Password of Compute service user nova  hsSNsqc43RABBIT_PASS    Password of user guest of RabbitMQ  o3NXovnz5SWIFT_PASS    Password of Object Storage service user swift  6ci5xWOdkMETADATA_SECRET      m8uhmQTu2

 

/* 设置主机名 */1.两台机器,设置hostname//方法--〉1. hostname + 主机名--〉2. vi /etc/hostname 让其永久生效2. 编辑/etc/hosts192.168.216.120 master192.168.216.126 slave/* 配置完后,            可以ping 一下hostname 看是否通 */

 

/* 同步时间 *///master[root@master ~]# yum install -y chrony[root@master ~]# vi /etc/chrony.conf//add or changeallow 192.168.216.0/24    //ip网段[root@master ~]# systemctl enable chronyd.service[root@master ~]# systemctl start chronyd.service[root@master ~]# ps aux|grep chronydchrony   10140  0.2  0.0  98552  1300 ?        S    15:07   0:00 /usr/sbin/chron                       ydroot     10148  0.0  0.0 112656   996 pts/0    S+   15:07   0:00 grep --color=au                       to chronyd//slave[root@slave ~]# yum install -y chrony[root@slave ~]# vi /etc/chrony.conf//add or change,其他的解释掉server master iburst     //master为主名[root@slave ~]# systemctl enable chronyd.service[root@slave ~]# systemctl start chronyd.service[root@slave ~]# ps aux|grep chronydchrony   10639  0.1  0.0  98552  1296 ?        S    15:09   0:00 /usr/sbin/chron                       ydroot     10649  0.0  0.0 112656   996 pts/0    S+   15:09   0:00 grep --color=au                       to chronyd

 

openstack前期准备