1.apt-get更换源
guo@drguo1:~$ sudo gedit /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted deb http://mirrors.163.com/ubuntu/ precise universe deb-src http://mirrors.163.com/ubuntu/ precise universe deb http://mirrors.163.com/ubuntu/ precise-updates universe deb-src http://mirrors.163.com/ubuntu/ precise-updates universe deb http://mirrors.163.com/ubuntu/ precise multiverse deb-src http://mirrors.163.com/ubuntu/ precise multiverse deb http://mirrors.163.com/ubuntu/ precise-updates multiverse deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
guo@drguo1:~$ sudo apt-get update
2.下载git
guo@drguo1:~$ sudo apt-get install git
3.下载devstack源码
guo@drguo1:~$ git clone https://git.openstack.org/openstack-dev/devstack
4.创建stack用户
guo@drguo1:~$ devstack/tools/create-stack-user.sh Giving stack user passwordless sudo privileges grep: /etc/sudoers: Permission denied devstack/tools/create-stack-user.sh: line 52: /etc/sudoers: Permission denied guo@drguo1:~$ sudo devstack/tools/create-stack-user.sh Creating a group called stack Creating a user called stack Giving stack user passwordless sudo privileges guo@drguo1:~$ sudo passwd stack Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully guo@drguo1:~$ logout
5.用stack用户登录
6.在用户家目录下再下一份源码
stack@drguo1:~$ git clone https://git.openstack.org/openstack-dev/devstack
7.拷贝一份local.conf
stack@drguo1:~$ cp devstack/samples/local.conf ./devstack/ stack@drguo1:~$ cd devstack/ stack@drguo1:~/devstack$ gedit local.conf
8.修改local.conf中的HOST-IP
改为你主机的IP,#别忘去了,不去还是注释
9.运行stack.sh
stack@drguo1:~/devstack$ ./stack.sh
等半小时左右应该就安好了。。。
若出现了E:Could not get lock/var/lib/apt/lists/lock -open(...)
解决方法:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo apt-get update