好人
分类: 云计算
2016-01-23 00:49:52
操作系统采用ubuntu14.04桌面版,当然我是为了装eclipse,也可以server版。
操作系统分配2块网卡(均为桥接模式)
操作系统安装过程没啥好说的 。
Ubuntu创建虚拟机的时候不要用admin/admin ,另外不要用小键盘输入密码。
网卡配置:一块上网 一块不配置地址
auto lo iface lo inet loopback
auto eth0 iface eth0
inet static address 192.168.1.7
gateway 192.168.1.1
netmask 255.255.255.0auto eth1
iface eth1 inet static
1.由于ubuntu安装完后只有普通用户,没有超级ROOT用户,所以在实现一些功能上需要反复的输入密码.因此,人个用最好创建一个ROOT管理,创建ROOT帐号及密码很简单,只要设定ROOT密码后,注销重进,用ROOT帐号登录就行!
sudo passwd root
2.ssh配置
Ubuntu系统上默认是没有ssh server端的安装、启动sshd服务
3.ubutun自带vi工具,光标上下左右变成ABCD
解决方法:
只要依次执行以下两个命令即可完美解决Ubuntu下vi编辑器方向键变字母的问题。
1).执行命令
sudo apt-get remove vim-common -y
2).执行命令
sudo apt-get install vim -y
4.dns 设置开机会消失
不能直接修改/etc/resolv.conf这是个软连接
将nameserver 8.8.8.8 加入到/etc/resolvconf/resolv.confd/base
5.设置国内源(我用的阿里云)
vim /etc/apt/sources.list
deb .aliyun.com/ubuntu/ trusty main restricted deb-src .aliyun.com/ubuntu/ trusty main restricted deb .aliyun.com/ubuntu/ trusty-updates main restricted deb-src .aliyun.com/ubuntu/ trusty-updates main restricted deb .aliyun.com/ubuntu/ trusty universe deb-src .aliyun.com/ubuntu/ trusty universe deb .aliyun.com/ubuntu/ trusty-updates universe deb-src .aliyun.com/ubuntu/ trusty-updates universe deb .aliyun.com/ubuntu/ trusty multiverse deb-src .aliyun.com/ubuntu/ trusty multiverse deb .aliyun.com/ubuntu/ trusty-updates multiverse deb-src .aliyun.com/ubuntu/ trusty-updates multiverse deb .aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src .aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb .aliyun.com/ubuntu/ trusty-security main restricted deb-src .aliyun.com/ubuntu/ trusty-security main restricted deb .aliyun.com/ubuntu/ trusty-security universe deb-src .aliyun.com/ubuntu/ trusty-security universe deb .aliyun.com/ubuntu/ trusty-security multiverse deb-src .aliyun.com/ubuntu/ trusty-security multiverse deb .ubuntu.com/ubuntu trusty main deb-src .ubuntu.com/ubuntu trusty main
apt-get update
1.安装git
sudo apt-get install git
2.下载包
cd /home/
sudo git clone -b stable/kilo https://git.openstack.org/openstack-dev/devstack
3.创建用户
devstack/tools/create-stack-user.sh; su stack
4.修改devstack目录
sudo chown -R stack:stack /home/devstack
5.编辑local.conf
vim /home/devstack/local.conf
[[local|localrc]]
HOST_IP=192.168.1.7
SERVICE_HOST=$HOST_IP
MYSQL_HOST=$HOST_IP
RABBIT_HOST=$HOST_IP
GLANCE_HOSTPORT=$HOST_IP:9292
ADMIN_PASSWORD=123456
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
disable_service n-net
ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3
Q_USE_SECGROUP=True
FLOATING_RANGE="192.168.1.0/24"
FIXED_RANGE="10.0.0.0/24"
Q_FLOATING_ALLOCATION_POOL=start=192.168.1.250,end=192.168.1.254
PUBLIC_NETWORK_GATEWAY="192.168.1.1"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eth1
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
disable_service tempest
5.使用git单独下载源代码
sudo su - stack
git clone -b stable/kilo git://git.openstack.org/openstack/horizon.git /opt/stack/horizon
git clone -b stable/kilo git://git.openstack.org/openstack/keystone.git /opt/stack/keystone
git clone -b stable/kilo git://git.openstack.org/openstack/nova.git /opt/stack/nova
git clone -b stable/kilo git://git.openstack.org/openstack/neutron.git /opt/stack/neutron
git clone -b stable/kilo git://git.openstack.org/openstack/glance.git /opt/stack/glance
git clone -b stable/kilo git://git.openstack.org/openstack/cinder
6.修改配置文件
1.具体问题忘记了,只知道需要执行下,形式下面的命令
pip install –upgrade pip
2.重启设备后一定要执行
./rejoin.sh 重新启动服务
3.novnc无法访问
nova.conf中的novnc-enable true 改成大写True,然后重启服务nova.conf中的novnc-enable true 改成大写True,然后重启服务
nova-all --config-file=/etc/nova/nova.conf &
nova-consoleauth --config-file=/etc/nova/nova.conf &
nova-novncproxy --config-file=/etc/nova/nova.conf &
nova-cert --config-file=/etc/nova/nova.conf &
总结:devstack 安装还是比较简单的,而且根据local.conf定制安装需求,省去了大量的手动配置。
但是,devstack每次重启要手动启动服务不爽,不想每次rejoin就备份快照吧。