CentOS 6.2下源码安装OpenStack keystone
1.将当前用户ugyn添加到sudo:
suecho 'ugyn ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
su ugyn
2.安装epel:
sudo rpm -i http://download.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
3.安装git:
sudo yum install git
4.安装setuptools:
sudo yum install python-setuptools
5.安装pip:
下载pip: http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#md5=62a9f08dd5dc69d76734568a6c040508
解压:tar zxpf pip-1.1.tar.gz
安装:cd pip-1.1 && sudo python setup.py install
6.获取最新的keystone代码:
cd
git clone https://github.com/openstack/keystone.git
7.安装依赖:
先安装pip依赖:sudo yum install python-sqlite2 python-lxml python-greenlet-devel python-ldap
sudo pip install -r keystone/tools/pip-requires
8.安装keystone:
cd keystone && sudo python setup.py install
9.配置keystone:
拷贝默认配置文件:sudo cp -R etc /etc/keystone
修改/etc/keystone/keystone.conf的数据库连接为mysql: connection = mysql://user:[email protected]/database
sudo vim /etc/keystone/keystone.conf
10.设置mysql:
修改/etc/my.cnf
在[mysqld]下添加:(理由见这里)
default_table_type=InnoDB
character-set-server=utf8
init_connect='SET NAMES utf8'
使mysql开机自动运行:sudo chkconfig mysqld on
重启动mysqld:sudo service mysqld restart
登录mysql创建所需数据库及用户:
create database keystone;
grant all privileges on keystone.* to 'keystone'@'%' identified by 'keystone';
11.初始化数据库:
keystone-manage db_sync
12.安装keystorn客户端:
cd
git clone https://github.com/openstack/python-keystoneclient.git
sudo pip install -r python-keystoneclient/tools/pip-requires
cd python-keystoneclient && sudo python setup.py install
13.启动keystone:
keystone-all
14.创建初始tenants、users、roles、services、endpoints:
修改keystone/tools/sample_data.sh,在文件开头添加以下内容:
#设置管理密码:
ADMIN_PASSWORD=youradminpassword
#设置服务密码:
SERVICE_PASSWORD=yourservicepassword
#要创建endpoint,请添加:
ENABLE_ENDPOINTS=true
#要创建与swif相关的user,service:
ENABLE_SWIFT=true
#要创建与quantum相关的user,service,添加:
ENABLE_QUANTUM=true
运行脚本:
cd
sudo keystone/tools/sample_data.sh
15.测试:
keystone tenant-list
keystone user-list
keystone service-list
keystone role-list
keystone endpoint-list
16.测试结果:
参考文档:
http://keystone.openstack.org/setup.html
http://keystone.openstack.org/installing.html
http://keystone.openstack.org/configuration.html
http://docs.openstack.org/trunk/openstack-compute/install/content/ch_installing-openstack-identity-service.html
相关推荐
fyggzb 2020-07-05
fyggzb 2020-06-12
hhphhp 2020-01-10
Tomstrong 2017-11-29
shenycs 2015-02-03
bingxx 2013-08-08
ljwsvip 2019-07-01
fabian 2019-06-29
zuopaide 2012-05-28
danelumax 2017-04-20
AHUTSZF 2014-08-07
熊崽Kevin 2013-09-13
DiroProgrammer 2013-06-19
zuopaide 2013-05-19
熊崽Kevin 2013-05-12
zuopaide 2013-04-28
wangxuesonger 2013-08-01
danelumax 2013-07-31