(controller) python
1.源、EPEL源 mysql
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