1、安装keystone软件包
[root@os-node1 ~]# yum install openstack-keystone python-keystoneclient -y
配置keystone配置文件
[root@os-node1 ~]# openstack-config --set /etc/keystone/keystone.conf sql connection mysql://keystone:[email protected]/keystone #以IP的形式连接mysql
2、配置keystone DB数据库
[root@os-node1 ~]# openstack-db --init --service keystone --password keystone
Please enter the password for the 'root' MySQL user:
Verified connectivity to MySQL.
Creating 'keystone' database.
Initializing the keystone database, please wait...
2014-08-26 09:04:50.930 19522 CRITICAL keystone [-] (OperationalError) (1045, "Access denied for user 'keystone'@'os-node1' (using password: YES)") None None
ERROR 1146 (42S02) at line 1: Table 'keystone.migrate_version' doesn't exist
Final sanity check failed.
Please file a bug report on bugzilla.redhat.com against the openstack-keystone package.
上面的报错,在解析主机的时候是认的是域名,如果连接mysql时用IP形式的需要在mysql配置文件中加入下面的命令
[root@os-node1 ~]# vi /etc/my.cnf
[mysqld]
skip-name-resolve #加入这条命令,意思是跳过域名解析
之后重启mysql
service mysqld restart
再次安装keystone库
[root@os-node1 ~]# openstack-db --init --service keystone --password keystone
Please enter the password for the 'root' MySQL user:
Verified connectivity to MySQL.
Creating 'keystone' database.
Initializing the keystone database, please wait...
Complete