ubuntu 安装 swift
第一步 安装mysql和mysql的python支持
apt-get install python-mysqldb mysql-server
第二步 配置mysql
vim /etc/mysql/my.cnf ----------------------------------------------------------- [mysqld] …… bind-address = 0.0.0.0 …… default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci init-connect = 'SET NAMES utf8' character-set-server = utf8 ----------------------------------------------------------- mysql_install_db mysql_secure_installation
第三步 安装keystone
apt-get install python-software-properties add-apt-repository cloud-archive:icehouse apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y apt-get install linux-image-generic-lts-saucy linux-headers-generic-lts-saucy reboot apt-get install keystone
第四步 配置keystone
vim /etc/keystone/keystone.conf ----------------------------------------------------------------------------- [DEFAULT] admin_token=ADMIN_TOKEN public_bind_host=10.194.148.102 admin_bind_host=10.194.148.102 compute_port=8774 admin_port=35357 public_port=5000 public_endpoint=http://10.194.148.102:5000/ admin_endpoint=http://10.194.148.102:35357/ log_dir = /var/log/keystone [auth] methods=external,password,token password=keystone.auth.plugins.password.Password token=keystone.auth.plugins.token.Token external=keystone.auth.plugins.external.DefaultDomain [catalog] template_file=default_catalog.templates driver=keystone.catalog.backends.sql.Catalog [credential] driver=keystone.credential.backends.sql.Credential [database] connection = mysql://keystone:keystone@10.194.148.102/keystone [identity] driver=keystone.identity.backends.sql.Identity [memcache] servers=10.194.148.102:11211 [paste_deploy] config_file=keystone-paste.ini [token] driver=keystone.token.backends.sql.Token
第五步 在mysql中创建keystone数据库
rm /var/lib/keystone/keystone.db mysql -u root -p ----------------------------------------------------------------------------- mysql> CREATE DATABASE keystone; mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone'; mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone'; mysql> exit
第六步
su -s /bin/sh -c "keystone-manage db_sync" keystone