#绑定IP
[mysqld]
bind-address = 10.0.0.11
#设置字符集等
default-storage-engine = innodb .
innodb_file_per_table
collation-server = utf8_general_ci
character-set-server = utf8
配置启动项,启动等
systemctl enable mariadb.service
systemctl start mariadb.service
数据库初始化,创建root密码等,操作如下
mysql_secure_installation
Enter current password for root (enter for none):[Enter]
Set root password? [Y/n] Y
New password: openstack
Re-enter new password:openstack
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
消息队列rabbitmq
安装
yum install rabbitmq-server
配置启动项,启动
systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service
添加openstack用户
rabbitmqctl add_user openstack RABBIT_PASS
设置openstack用户的权限,依次分别为写,读,访问
rabbitmqctl set_permissions openstack ".*"".*"".*"
NoSQL Mongodb
安装
yum install mongodb-server mongodb
配置/etc/mongod.conf配置文件
bind_ip = 10.0.0.11
#smallfile=true可选
smallfiles = true
配置启动项,启动
# systemctl enable mongod.service
# systemctl start mongod.service
Memcached
安装
# yum install memcached python-memcached
配置启动项,启动
# systemctl enable memcached.service
# systemctl start memcached.service
至此,openstack整个框架的软件环境基本搞定,下面就是各组件了。
安装各组件很有意思,除了keystone基本上是差不多的步骤,唯一的区别就是创建时指定的名字不同而已,基本是一般以下步骤。
1)配置数据库
create database xxx
GRANT ALL PRIVILEGES ON keystone.* TO 'xxxx'@'localhost' \
IDENTIFIED BY 'XXXX_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'xxxx'@'%' \
IDENTIFIED BY 'XXXX_DBPASS';
2)安装
yum install xxx
3)配置文件
配置各项服务的连接,比如数据库,rabbitmq等
认证配置
特定配置
5)数据库同步
创建需要的表
4)加入启动项,启动
# systemctl enable openstack-xxx.service
# systemctl start openstack-xxxx.service
5)创建用户,service,endpoint等
openstack user create xxx
openstack service create xxx
openstack endpoint create xxx
6)验证服务是否成功
注:配置文件的配置建议首先备份,然后为了省略不必要的篇幅,在此说明配置文件的编辑方式,如下。
[DEFAULT]
...
admin_token = ADMIN_TOKEN
上面的内容,指明在[DEFAULT]的段落加入admin_token = ADMIN_TOKEN内容。
各组件安装
认证服务 Keystone
配置数据库