分享

openstack【Kilo】入门 【准备篇】五:mysql及rabbitmq安装【centos】

pig2 发表于 2015-9-13 16:48:46 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 21039
本帖最后由 pig2 于 2015-9-23 17:33 编辑

问题导读


1.bind-address绑定的是哪个节点的ip地址?
2.消息队列,如何自定义rabbitmq密码?








安装配置数据库

1.安装mysql
[mw_shl_code=bash,true]yum install mariadb mariadb-server MySQL-python[/mw_shl_code]


2.创建文件完成下面内容 /etc/my.cnf.d/mariadb_openstack.cnf

a.在 [mysqld] 部分,设置bind-address,此为控制节点ip地址
[mw_shl_code=bash,true][mysqld]
...
bind-address = 10.0.0.11[/mw_shl_code]


b.在 [mysqld] 部分,完成下面内容
[mw_shl_code=bash,true][mysqld]
...
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8[/mw_shl_code]


完成安装

启动系统,开启配置数据库服务

[mw_shl_code=bash,true]systemctl enable mariadb.service
systemctl start mariadb.service[/mw_shl_code]


安全数据库服务
[mw_shl_code=bash,true] mysql_secure_installation[/mw_shl_code]

[mw_shl_code=bash,true]NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB![/mw_shl_code]


消息队列


安装消息队列服务
[mw_shl_code=bash,true]yum install rabbitmq-server[/mw_shl_code]


配置消息队列服务
[mw_shl_code=bash,true] systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service[/mw_shl_code]


添加openstack user
[mw_shl_code=bash,true]rabbitmqctl add_user openstack RABBIT_PASS[/mw_shl_code]

[mw_shl_code=bash,true]Creating user "openstack" ...
...done.[/mw_shl_code]

执行配置,写读访问openstack用户
[mw_shl_code=bash,true] rabbitmqctl set_permissions openstack ".*" ".*" ".*"[/mw_shl_code]

[mw_shl_code=bash,true]Setting permissions for user "openstack" in vhost "/" ...
...done.[/mw_shl_code]

相关篇章

openstack【Kilo】入门 【准备篇】一:整体介绍【centos】
http://www.aboutyun.com/thread-15205-1-1.html


openstack【Kilo】入门 【准备篇】二:检测网络互通性【centos】
http://www.aboutyun.com/thread-15206-1-1.html


openstack【Kilo】入门 【准备篇】三:NTP安装【centos】
http://www.aboutyun.com/thread-15207-1-1.html



openstack【Kilo】入门 【准备篇】四:openstack包【centos】
http://www.aboutyun.com/thread-15210-1-1.html



openstack【Kilo】入门 【准备篇】五:mysql及rabbitmq安装【centos】
http://www.aboutyun.com/thread-15213-1-1.html



openstack【Kilo】入门 【keystone篇】六:keystone安装配置【centos】
http://www.aboutyun.com/thread-15214-1-1.html



openstack【Kilo】入门 【keystone篇】七:创建服务实例和API endpoint【centos】
http://www.aboutyun.com/thread-15215-1-1.html



openstack【Kilo】入门 【keystone篇】八:创建租户, 用户, 和角色【centos】
http://www.aboutyun.com/thread-15216-1-1.html



openstack【Kilo】入门 【keystone篇】九:验证keystone安装【centos】
http://www.aboutyun.com/thread-15233-1-1.html




openstack【Kilo】入门 【keystone篇】十:创建openstack客户端脚本【centos】
http://www.aboutyun.com/thread-15234-1-1.html



openstack【Kilo】入门 【glance篇】十一:安装配置glance【centos】
http://www.aboutyun.com/thread-15242-1-1.html



openstack【Kilo】入门 【glance篇】十二:glance安装验证【centos】
http://www.aboutyun.com/thread-15243-1-1.html




openstack【Kilo】入门 【nova篇】十三:nova安装配置1:控制节点【centos】
http://www.aboutyun.com/thread-15258-1-1.html



openstack【Kilo】入门 【nova篇】十四:nova安装配置2:计算节点【centos】
http://www.aboutyun.com/thread-15259-1-1.html



openstack【Kilo】入门 【neutron篇】十五:neutron安装配置:控制节点【centos】
http://www.aboutyun.com/thread-15260-1-1.html




openstack【Kilo】入门 【neutron篇】十六:neutron安装配置:网络节点【centos】
http://www.aboutyun.com/thread-15272-1-1.html



openstack【Kilo】入门 【neutron篇】十七:neutron安装配置:计算节点【centos】
http://www.aboutyun.com/thread-15330-1-1.html




openstack【Kilo】入门 【neutron篇】十八:实例化网络【centos】
http://www.aboutyun.com/thread-15342-1-1.html




openstack【Kilo】入门 【neutron篇】十九:dasboard安装配置【centos】
http://www.aboutyun.com/thread-15352-1-1.html




openstack【Kilo】入门 【neutron篇】二十:创建实例(neutron)【centos】
http://www.aboutyun.com/thread-15356-1-1.html








已有(3)人评论

跳转到指定楼层
myufo 发表于 2015-10-19 15:45:41
在CentOS7下根本无法启动啊,我试过两天主机了。
提示 Job for rabbitmq-server.service failed. See 'systemctl status rabbitmq-server.service' and 'journalctl -xn' for details.
回复

使用道具 举报

mituan2008 发表于 2015-10-19 16:13:51
myufo 发表于 2015-10-19 15:45
在CentOS7下根本无法启动啊,我试过两天主机了。
提示 Job for rabbitmq-server.service failed. See 'sys ...

是否启用了
回复

使用道具 举报

myufo 发表于 2015-10-19 17:26:42

启用了,最终发现是我改了hosts文件导致的错误。但出错后需要卸载rabbitmq,然后find / 把rabbitmq所有文件删除。然后重新安装才可以。  只改hosts然后重启系统没用。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条