计算节点组件:
1、mysql
2、keystone
3、Nova
4、glance
5、rabbitmq
控制节点组件:
1、cinder
2、dashboard
一、修改主机名及静态IP1、vim /etc/hostname
xxctrl(xxctrl改为目标名)
2、vim /etc/hosts
IP xxctrl(目标名)
3、hostname xxctrl (使改名生效,也可重启虚拟)
二、配置网络接口1、vim /etc/network/interfaces
auto eth0
iface eth0 inet static
address XX.XX.XX.XX(修改为自己IP1)
netmask 255.255.240.0
network XX.XX.0.0
broadcast 10.18.0.255
gateway 10.18.0.254
dns-nameservers 61.139.2.69
2、/etc/init.d/networking restart (使网络配置生效)
三、修改为163源(可选),并更新系统及内核1、cd /etc/apt vim sources.list
这里给大家贴出12.04的163的源,速度比较快,大家可根据自己需求选择其他的源,只要版本统一。
deb Ubuntu/ precise main universe restricted multiverse
deb-src precise main universe restricted multiverse
deb precise-security universe main multiverse restricted
deb-src precise-security universe main multiverse restricted
deb precise-updates universe main multiverse restricted
deb precise-proposed universe main multiverse restricted
deb-src precise-proposed universe main multiverse restricted
deb precise-backports universe main multiverse restricted
deb-src precise-backports universe main multiverse restricted
deb-src precise-updates universe main multiverse restricted
2、更新系统及内核
apt-get update && apt-get upgrade && apt-get dist-upgrade
3、增加F版源
vim sources.list
deb precise-proposed/folsom main
deb precise-updates/folsom main
4、apt-get install ubuntu-cloud-keyring
5、apt-get update
1、vim /etc/sysctl.conf
net.ipv4.ip_forward=1
2、 sysctl -p(执行使配置生效)
五、安装并配置NTP 服务1、apt-get install ntp
2、sed -i 's/server ntp.ubuntu.com/server ntp.ubuntu.com\nserver 127.127.1.0\nfudge 127.127.1.0 stratum 10/g' /etc/ntp.conf
3、 重启服务: service ntp restart
六、安装并配置MySQL 数据库1、apt-get install -y mysql-server python-mysqldb
2、sed -i "s/127.0.0.1/0.0.0.0/" /etc/mysql/my.cnf
3、 service mysql restart
4、创建数据库并设置权限
mysql -uroot -pxxxx(自己的密码)
CREATE DATABASE nova;
CREATE DATABASE glance;
CREATE DATABASE keystone;
CREATE DATABASE cinder;
grant all privileges on *.* to root@'%' identified by 'pwd';
grant all privileges on nova.* to nova@'%' identified by 'pwd';
grant all privileges on glance.* to glance@'%' identified by 'pwd';
grant all privileges on keystone.* to keystone@'%' identified by 'pwd';
grant all privileges on cinder.* to cinder@'%' identified by 'pwd';
FLUSH PRIVILEGES;
exit;
重启数据库服务:service mysql restart
1、vim sources.list
deb kitten main
2、wget
3、apt-key add rabbitmq-signing-key-public.asc
4、apt-get update
5、apt-get install -y rabbitmq-server
6、查看服务状态
service rabbitmq-server status
1. 生成一个随机值在初始的配置中作为管理员的令牌(token)。
openssl rand -hex 10
2、安装keystack
apt-get install keystone
3、编辑 /etc/keystone/keystone.conf,并完成下列操作:
a. 在 [DEFAULT] 段中,对管理员令牌进行配置。
admin_token = ADMIN_TOKEN //将 ADMIN_TOKEN替换为上一步中生成的随机字符串。
b. 在 [database] 段,配置数据库访问相关参数:
[database]
connection = mysql://keystone:KEYSTONE_DBPASS@IP/keystone
4、初始化身份认证服务的数据库,建立好的数据库是空的,需要初始化Keystone 数据库的表结构。
service keystone restart
keystone-manage db_sync
5、通过脚本创建租户、用户和角色并定义Services 和API Endpoints
a. 配置管理员令牌:
export OS_SERVICE_TOKEN=ADMIN_TOKEN //将其中的 ADMIN_TOKEN 替换为管理员令牌。例如:export OS_SERVICE_TOKEN=294a4c8a8a475f9b9836
b.下载脚本文件
wget https://raw.github.com/nimbula/OpenStack-Folsom-Install-guide/master/Keystone_Scripts/Without%20Quantum/keystone_basic.sh
wget https://raw.github.com/nimbula/OpenStack-Folsom-Install-guide/master/Keystone_Scripts/Without%20Quantum/keystone_endpoints_basic.sh