前言
一、安装openstack的dev版本control端
- root@openstack:~# chmod 755 install_openstack.sh
- root@openstack:~# nohup bash install_openstack.sh install_dev_control &
- [1] 2276
- root@openstack:~# nohup: ignoring input and appending output to `nohup.out'
- root@openstack:~# kvm-ok
- INFO: Your CPU does not support KVM extensions
- KVM acceleration can NOT be used
- root@client:~# bash install_openstack.sh install_dev_compute
- Sat Nov 24 01:35:14 CST 2012 Start install!
- ###network configure###
- It is correct!
- ###mondiy env###
- It is correct!
- ###install ntp###
- It is correct!
- ###restart ntp service###
- It is correct!
- ###install bridge iscsi###
- It is correct!
- ####restart network###
- It is correct!
- ###install nova###
- It is correct!
- ###mondiy /etc/nova/api-paste.ini ###
- It is correct!
- ###down /etc/nova/nova.conf from server###
- [email protected]'s password:
- nova.conf 100% 1675 1.6KB/s 00:00
- ###mondiy /etc/nova/nova.conf ###
- It is correct!
- ###create restart service script###
- It is correct!
- ###restart server###
- It is correct!
- Now,nova client is finish install!
- Sat Nov 24 01:35:59 CST 2012 Finish install!
- Total runtime: 45 Seconds
- root@client:~# nova-manage service list
- Binary Host Zone Status State Updated_At
- nova-consoleauth openstack nova enabled :-) 2012-11-23 17:38:13
- nova-cert openstack nova enabled :-) 2012-11-23 17:38:13
- nova-compute openstack nova enabled :-) 2012-11-23 17:38:15
- nova-scheduler openstack nova enabled :-) 2012-11-23 17:38:13
- nova-network openstack nova enabled :-) 2012-11-23 17:38:14
- nova-compute client nova enabled :-) 2012-11-23 17:38:16
- nova-network client nova enabled :-) 2012-11-23 17:38:13
- root@openstack:~# source /root/env_config
- root@openstack:~# nova list
- +--------------------------------------+-------+--------+----------+
- | ID | Name | Status | Networks |
- +--------------------------------------+-------+--------+----------+
- | 5584c108-38a4-4d10-9a6f-6fa1bf7ec5d8 | test1 | ERROR | |
- +--------------------------------------+-------+--------+----------+
- root@openstack:~# nova-manage version list
- 2012.1.3-dev (2012.1.3-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# bash install_openstack.sh install_dev_control_delete
- Fri Nov 23 23:22:55 CST 2012 Start install!
- ###uninstall OpenStack and mysql###
- It is correct!
- ###uninstall other tools###
- It is correct!
- ###clean cache###
- It is correct!
- ###Uninstall openstack finish,please reboot system###
- Fri Nov 23 23:24:35 CST 2012 Finish install!
- Total runtime: 1 Minutes
- 3、root@openstack:~# mysql
- The program 'mysql' is currently not installed. You can install it by typing:
- apt-get install mysql-client-core-5.5
- root@openstack:~# keystone
- The program 'keystone' is currently not installed. You can install it by typing:
- apt-get install python-keystoneclient
- root@openstack:~# nova
- -bash: /usr/bin/nova: No such file or directory
- root@openstack:~# nova llist
- -bash: /usr/bin/nova: No such file or directory
- root@openstack:~# glance
- The program 'glance' is currently not installed. You can install it by typing:
- apt-get install glance-client
- root@client:~# bash install_openstack.sh install_dev_compute_delete
- Sat Nov 24 01:39:11 CST 2012 Start install!
- ###uninstall OpenStack###
- It is correct!
- ###clean cache###
- It is correct!
- ###Uninstall openstack finish,please reboot system###
- Sat Nov 24 01:39:29 CST 2012 Finish install!
- Total runtime: 18 Seconds
- root@client:~# nova-manage service list
- -bash: /usr/bin/nova-manage: No such file or directory
- root@openstack:~# nova-manage service list
- Binary Host Zone Status State Updated_At
- nova-consoleauth openstack nova enabled :-) 2012-11-23 17:40:45
- nova-cert openstack nova enabled :-) 2012-11-23 17:40:45
- nova-compute openstack nova enabled :-) 2012-11-23 17:40:37
- nova-scheduler openstack nova enabled :-) 2012-11-23 17:40:45
- nova-network openstack nova enabled :-) 2012-11-23 17:40:45
- nova-compute client nova enabled XXX 2012-11-23 17:39:08
- nova-network client nova enabled XXX 2012-11-23 17:39:04
- root@openstack:~# fdisk -l
- Disk /dev/sda: 32.2 GB, 32212254720 bytes
- 255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
- Units = sectors of 1 * 512512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x000b8d5a
- Device Boot Start End Blocks Id System
- /dev/sda1 * 2048 499711 248832 83 Linux
- /dev/sda2 501758 62912511 31205377 5 Extended
- /dev/sda5 501760 62912511 31205376 8e Linux LVM
- Disk /dev/sdb: 8589 MB, 8589934592 bytes
- 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
- Units = sectors of 1 * 512512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
- Disk /dev/sdb doesn't contain a valid partition table
- Disk /dev/mapper/openstack-root: 29.8 GB, 29804724224 bytes
- 255 heads, 63 sectors/track, 3623 cylinders, total 58212352 sectors
- Units = sectors of 1 * 512512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
- Disk /dev/mapper/openstack-root doesn't contain a valid partition table
- Disk /dev/mapper/openstack-swap_1: 2147 MB, 2147483648 bytes
- 255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors
- Units = sectors of 1 * 512512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
- Disk /dev/mapper/openstack-swap_1 doesn't contain a valid partition table
- root@openstack:~# chmod 755 install_openstack.sh
- root@openstack:~# nohup bash install_openstack.sh install_folsom_control &
- [1] 1371
- root@openstack:~# nohup: ignoring input and appending output to `nohup.out'
下面是日志的截图
- root@openstack:~# nova-manage version list
- 2012.2 (2012.2-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# nova-manage version list
- 2012.2 (2012.2-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# nova-manage version list
- 2012.1 (2012.2-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# cinder-manage version list
- 2012.2 (2012.2-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# nova-manage version list
- 2012.2 (2012.2-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# cinder-manage version list
- 2012.2 (2012.2-LOCALBRANCH:LOCALREVISION)
- root@openstack:~# bash install_openstack.sh install_folsom_control_delete
- Sat Nov 24 02:55:55 CST 2012 Start install!
- ###uninstall OpenStack and mysql###
- It is correct!
- ###uninstall mysql###
- It is correct!
- ###delete mysql database###
- It is correct!
- ###uninstall other tools###
- It is correct!
- ###clean cache###
- It is correct!
- ###Uninstall openstack finish,please reboot system###
- Sat Nov 24 02:57:42 CST 2012 Finish install!
- Total runtime: 1 Minutes
- root@openstack:~# mysql
- The program 'mysql' is currently not installed. You can install it by typing:
- apt-get install mysql-client-core-5.5
- root@openstack:~# nova
- -bash: /usr/bin/nova: No such file or directory
- root@openstack:~# cinder-manage version
- -bash: /usr/bin/cinder-manage: No such file or directory
现在各个模块都讲完了,如果大家对模块不了解的话,可以使用bash install_openstack.sh进行查看有哪些可以使用的模块。
- root@openstack:~# bash install_openstack.sh
- Usage:install_openstack.sh {install_dev_control|install_dev_control_delete|install_dev_compute|install_dev_compute_delete|install_folsom_control|install_folsom_control_delete}
对于为什么在使用sh运行脚本出现的一下问题
- root@openstack:~# sh install_openstack.sh
- install_openstack.sh: 9: install_openstack.sh: Syntax error: "(" unexpected
这个是由于在ubuntu里,模块不能使用function,而在redhat与centos都可以,所以你如果非得使用sh运行脚本的话,就可以使用sed -i 's#function ##' install_openstack.sh,但还是建议大家使用bash运行脚本。
如果各位还有问题可以留言,我会及时的为大家解答。
BTW:如果大家认为我写的不错,希望能给我的博客投个票,谢谢!
http://blog.51cto.com/contest2012/2382721