Openstack安装(1)--keystone安装

(controller)

1.源、EPEL源

 sudo rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm


2.安装 OpenStack KeyStone 服务
$ sudo yum install openstack-utils openstack-keystone python-keystoneclient 


3.安装数据库
$ sudo yum install mysql mysql-server MySQL-python


4.配置数据库开机启动
$ sudo chkconfig --level 2345 mysqld on
$ sudo service mysqld start


5.创建数据库存
$sudo openstack-db --init --service keystone 


mysql> GRANT ALL ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '[YOUR_KEYSTONEDB_PASSWORD]';
mysql> GRANT ALL ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '[YOUR_KEYSTONEDB_PASSWORD]';


6.配置keystone
 配置文件:/etc/keystone/keystone.conf
1)数据库:
connection = mysql://keystone:[YOUR_KEYSTONEDB_PASSWORD]@[your public IP]/keystone
2)配置Admin_Token。随机生成一串密令,并配置到keystone.conf中(也可手动修改文件中的ADMIN_TOKEN)。
$ export ADMIN_TOKEN=$(openssl rand -hex 10)
$ sudo openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN


7.启动keystone,并配置为自动启动
$ sudo service openstack-keystone start && sudo chkconfig openstack-keystone on 


8.初始化数据库
$ sudo keystone-manage db_sync


用户名 --------密码
keystone-------keystoneadmin

你可能感兴趣的:(keystone)