下载nova-2011.2.tar.gz
http://openstack.org/projects/compute/latest-release/
- tar -zxvf nova-2011.2.tar.gz
- cd /opt/nova
- Python26 setup.py install
十.配置
复制nova-api.conf文件
- cp /opt/nova/etc/nova-api.conf /etc/nova
复制目录
- mkdir -p /var/lib/nova/CA
- rsync -av /opt/nova/nova/CA/ /var/lib/nova/CA/
修改nova.conf文件,将mysqlconnection指向192.168.1.105
创建数据库
- mysql -uroot -h192.168.1.105 -p
- create database nova;
解决:设置nova库mysql的字符集
create database nova default character set latin1 collate latin1_swedish_ci;
再次执行:
- nova-manage --flagfile /etc/nova/nova.conf db sync
十二.启动服务
使用如下脚本重启服务
- export PATH=/usr/bin:/bin:/sbin:/usr/sbin
- function screen_it {
- screen -S nova -X screen -t $1
- screen -S nova -p $1 -X stuff "$2$NL"
- }
- screen -d -m -S nova -t nova
- sleep 1
- # Opens up screen with following commands. You will have to go screen by screen
- # and press RETURN to start them
- screen_it api "/usr/bin/nova-api --nodaemon --flagfile /etc/nova/nova.conf"
- screen_it objectstore "/usr/bin/nova-objectstore --nodaemon --flagfile /etc/nova/nova.conf"
- screen_it compute "/usr/bin/nova-compute --nodaemon --flagfile /etc/nova/nova.conf"
- screen_it network "/usr/bin/nova-network --nodaemon --flagfile /etc/nova/nova.conf"
- screen_it scheduler "/usr/bin/nova-scheduler --nodaemon --flagfile /etc/nova/nova.conf"
- #screen_it volume "/usr/bin/nova-volume --nodaemon --flagfile /etc/nova/nova.conf"
- #screen_it test ". /etc/nova/novarc"
- screen -S nova -x
推荐下面的命令到/etc/screenrc
- hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %= %H"
