http://docs.openstack.org/icehouse/install-guide/install/yum/content/basics-prerequisites.html
实验环境搭建:
vmware workstation, 安装一台 CentOS x64,然后复制两台,network 节点添加2块网卡,compute节点添加一块网卡,选的是host only。
2.1 network
修改相应的hostname
# vi /etc/sysconfig/network
IP地址设置:
controller节点:management :192.168.1.210
netowork节点: management:192.168.1.211
tunnels: 192.168.2.211
external:not set
compute1节点: management: 192.168.1.212
tunnels: 192.168.2.212
修改hosts文件,添加一下内容:
# vi/etc/hosts
# controller
192.168.1.210 controller
# network
192.168.1.211 network
# compute1
192.168.1.212 compute1
#注意要把127.0.0.1 和64位的localhost 注释掉!!!
# service NetworkManager stop
# service network start
# chkconfig NetworkManager off
# chkconfig network on
最后测试一下,相互之间都能ping通。
# 最后,我关闭了Selinux
1 vi /etc/selinux/config
2 #SELINUX=enforcing #注释掉
3 #SELINUXTYPE=targeted #注释掉
4 SELINUX=disabled #增加
5 :wq #保存,关闭。
6 reboot #重启系统
2.2 NTP
# yum install ntp
# service ntpd start
# chkconfig ntpd on
然后修改ntp server都指向controller
# vi /etc/ntp.conf
Server 192.168.1.210
将其他的server 行都注释掉。
2.3 database
Controller: 安装mysql 数据库
# yum install mysql mysql-server MySQL-python
# mysql_install_db
# service mysqld start
# mysql_secure_installation
# chkconfig mysqld on
修改 mysql 设置:
[mysqld]
bind-address = 192.168.1.210
default-storage-engine = innodb
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
# service mysqld start
# chkconfig mysqld on
如果忘记mysql root密码:
# vi /etc/my.cnf
[mysqld]
skip-grant-tables
# mysql -u root -p
mysql> Use mysql
mysql> UPDATE user SET Password = password ( 'mysqlpw' ) WHERE User = 'root' ;
Mysql> flush privileges;
之后再把 注释掉
#skip-grant-tables
# service mysqld restart
其他节点
# yum install MySQL-python
2.3 controller 上安装openstack包
# yum install yum-plugin-priorities //我之前装的时候没看到这个。。。
# yum install http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-3.noarch.rpm
# yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# yum install openstack-utils
# yum install openstack-selinux
# yum upgrade
# reboot
2.4 Messaging server
# yum install qpid-cpp-server
不做认证
# vi /etc/qpidd.conf
auth=no
# service qpidd start
# chkconfig qpidd on