cat /etc/apt/sources.list
deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/folsom main
deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main
EOF
apt-get update;
2.进入root权限,从始至终都使用root,工作目录为/root
sudo su -;
输入密码;
cd
3.安装ntp服务和设置ip转发
1
apt-get install ntp;
在/etc/ntp.conf中加入以下三行:
1
2
3
server ntp.ubuntu.com
server 127.127.1.0
fudge 127.127.1.0 stratum 10
重启ntp服务:
1
service ntp restart;
设置ip转发
1
2
sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' /etc/sysctl.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
检查是否开启ip转发
1
sysctl -p
4.安装mysql:
1
apt-get install mysql-server python-mysqldb
安装过程中设置密码root的密码为password
设置mysql接受所有的请求:
1
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
重启mysql服务:
1
service mysql restart
5.安装rabbitmq
1
apt-get -y install rabbitmq-server
6.安装keystone
1
apt-get install keystone
创建keystone的数据库
1
2
3
4
5
mysql -uroot -ppassword
create database keystone
GRANT ALL ON keystone.* TO 'keystoneUser'@'%' IDENTIFIED BY 'keystonePass';
GRANT ALL ON keystone.* TO 'keystoneUser'@'localhostt' IDENTIFIED BY 'keystonePass';
quit;
mysql -uroot -ppassword
create database glance
grant all on glance.* to 'glanceUser'@'%' identified by 'glanceUser'
grant all on glance.* to 'glanceUser'@'localhost' identified by 'glanceUser'
quit;
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br100
iface br100 inet static
address 192.168.0.55
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 172.16.0.16
dns-search mtv.nimbula.org
bridge_ports eth0
bridge_stp off
bridge_maxwait 0
bridge_fd 0
mysql -uroot -ppassword
create datebase nova;
GRANT ALL ON nova.* TO 'novaUser'@'%' IDENTIFIED BY 'novaPass';
GRANT ALL ON nova.* TO 'novaUser'@'localhost' IDENTIFIED BY 'novaPass';
quit;
# NETWORK
network_manager=nova.network.manager.FlatDHCPManager
force_dhcp_release=True
dhcpbridge_flagfile=/etc/nova/nova.conf
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
# Change my_ip to match each host
my_ip=192.168.0.55
public_interface=br100
vlan_interface=eth0
flat_network_bridge=br100
flat_interface=eth0
#Note the different pool, this will be used for instance range
fixed_range=192.168.0.128/28
mysql -uroot -ppassword
create datebase cinder;
grant all on cinder.* to 'cinderUser'@'%'identified by 'cinderPass';
grant all on cinder.* to 'cinderUser'@'localhost'identified by 'cinderPass'
#Enable the Ubuntu theme if it is present.
#try:
# from ubuntu_theme import *
#except ImportError:
# pass
重启服务
1
/etc/openstack-dashboard/local_settings.py
compute节点
1.更新源
1
2
3
4
5
cat /etc/apt/sources.list
deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/folsom main
deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main
EOF
apt-get update;
2.安装ntp并设置
1
2
3
apt-get install ntp
sed -i 's/server ntp.ubuntu.com/server 192.168.0.55/' /etc/ntp.conf
service ntp restart
3.安装网络控件
1
apt-get install vlan bridge-utils
4.设置ip转发
1
2
sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' /etc/sysctl.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br100
iface br100 inet static
address 192.168.0.89
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 172.16.0.16
dns-search mtv.nimbula.org
bridge_ports eth0
bridge_stp off
bridge_maxwait 0
bridge_fd 0
# NETWORK
network_manager=nova.network.manager.FlatDHCPManager
force_dhcp_release=True
dhcpbridge=/usr/bin/nova-dhcpbridge
dhcpbridge_flagfile=/etc/nova/nova.conf
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
# Change my_ip to match each host
my_ip=192.168.0.89
public_interface=br100
vlan_interface=eth0
flat_network_bridge=br100
flat_interface=eth0
#Note the different pool, this will be used for instance range
fixed_range=192.168.1.0/24