OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 2.安装配置OpenStack基础服务
节点配置情况说明:
控制节点:controller:
IP:192.168.164.128
hostname&hosts:likeadmin
计算加点:Nova:
IP:192.168.164.129
hostname&hosts:likenode
块存储节点:cinder:
IP:192.168.164.136
hostname&hosts:likeblock
1.安装配置OpenStack包
需要分别在likeadmin,likenode,likeblock三台主机上安装OpenStack包和客户端
1)在CentOS中, ``extras``仓库提供用于启用 OpenStack 仓库的RPM包。 CentOS 默认启用``extras``仓库,因此你可以直接安装用于启用OpenStack仓库的包。
# yum install centos-release-openstack-ocata
在RHEL上,下载和安装RDO仓库RPM来启用OpenStack仓库。
# yum install https://rdoproject.org/repos/rdo-release.rpm
2)安装 OpenStack 客户端:
# yum install python-openstackclient
3)RHEL和 CentOS 默认启用 SELinux 。安装 openstack-selinux 包实现对OpenStack服务的安全策略进行自动管理:
# yum install openstack-selinux
2.安装并配置SQL数据库
注意:SQL只需要安装在controller节点上,即likeadmin计算机
1)安全并配置组件
安装软件包:
# yum install mariadb mariadb-server python2-PyMySQL
2)创建并编辑 /etc/my.cnf.d/openstack.cnf,然后完成如下动作:
可在/usr/share/mariadb/my-medium.cnf路径下复制OpenStack.cnf文件
cp /usr/share/mariadb/my-medium.cnf /etc/my.cnf.d/openstack.cnf
在[mysqld]中,设置“bind-address”值为控制节点的管理网络IP地址以是的其他节点可以通过管理网络访问访问数据库。设置其他关键字来设置一些有用的选项和UTF-8编码:
[mysqld]
bind-address = 192.168.164.128
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
3)完成安装
启动数据库服务,并将其配置为开机自启:
# systemctl enable mariadb.service
# systemctl start mariadb.service
4)通过运行mysql_secure_installation脚本来保护数据库服务。 特别是,为数据库root帐户选择合适的密码:
# mysql_secure_installation
[root@likeadmin ~]# mysql_secure_installation
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): *这里不需要输入root的密码,直接enter就可以*
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 *这里选设置root密码*
New password: djl18001
Re-enter new password: djl18001
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!
[root@likeadmin ~]#
3. 安装并配置消息队列
OpenStack使用消息队列来协调服务之间的操作和状态信息。 消息队列服务通常在控制器节点上运行。
OpenStack支持多种消息队列服务,包括RabbitMQ,Qpid和ZeroMQ。 但是,大多数打包OpenStack的发行版都支持特定的消息队列服务。
本指南实现了RabbitMQ消息队列服务,因为大多数发行版都支持它。 如果您希望实现不同的消息队列服务,请查阅与其相关的文档。
1)安装包:
# yum install rabbitmq-server
2)启动消息队列服务并将其配置为随系统启动:
# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service
3)添加 openstack 用户:
# rabbitmqctl add_user openstack RABBIT_PASS *在实验环境下RABBIT_PASS设成:djl18001,在生产环境下请使用密文代替
Creating user "openstack" ...
用合适的密码替换 RABBIT_DBPASS。
4)给``openstack``用户配置写和读权限:
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
5)启动rabbitmq_management插件(可选做)
[root@likeadmin ~]# rabbitmq-plugins list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@likeadmin
|/
[ ] amqp_client 3.6.5
[ ] cowboy 1.0.3
[ ] cowlib 1.0.1
[ ] mochiweb 2.13.1
[ ] rabbitmq_amqp1_0 3.6.5
[ ] rabbitmq_auth_backend_ldap 3.6.5
[ ] rabbitmq_auth_mechanism_ssl 3.6.5
[ ] rabbitmq_consistent_hash_exchange 3.6.5
[ ] rabbitmq_event_exchange 3.6.5
[ ] rabbitmq_federation 3.6.5
[ ] rabbitmq_federation_management 3.6.5
[ ] rabbitmq_jms_topic_exchange 3.6.5
[ ] rabbitmq_management 3.6.5
[ ] rabbitmq_management_agent 3.6.5
[ ] rabbitmq_management_visualiser 3.6.5
[ ] rabbitmq_mqtt 3.6.5
[ ] rabbitmq_recent_history_exchange 1.2.1
[ ] rabbitmq_sharding 0.1.0
[ ] rabbitmq_shovel 3.6.5
[ ] rabbitmq_shovel_management 3.6.5
[ ] rabbitmq_stomp 3.6.5
[ ] rabbitmq_top 3.6.5
[ ] rabbitmq_tracing 3.6.5
[ ] rabbitmq_trust_store 3.6.5
[ ] rabbitmq_web_dispatch 3.6.5
[ ] rabbitmq_web_stomp 3.6.5
[ ] rabbitmq_web_stomp_examples 3.6.5
[ ] sockjs 0.3.4
[ ] webmachine 1.10.3
[root@likeadmin ~]#
[root@likeadmin ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@likeadmin... started 6 plugins.
[root@likeadmin ~]#
[root@likeadmin ~]# lsof -i:15672
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
beam.smp 22128 rabbitmq 54u IPv4 88245 0t0 TCP *:15672 (LISTEN)
[root@likeadmin ~]#
可通过浏览器访问RabbitMQ,访问地址是http://192.168.164.128:15672
默认账号密码:guest guest
登录后,在admin选项,为OpenStack账号设置登录密码,并添加administrator权限
4。安装并配置Memcached
各类服务的身份认证机制使用Memcached缓存令牌。缓存服务memecached通常运行在控制节点。在生产部署中,我们推荐联合启用防火墙、认证和加密保证它的安全。
1)安全并配置组件
安装软件包:
#yum install memcached python-memcached
2)编辑/etc/sysconfig/memcached文件并完成以下操作:
配置服务以使用控制器节点的管理IP地址。 这是为了通过管理网络启用其他节点的访问:
OPTIONS="-l 127.0.0.1,::1,likeadmin"
3)完成安装
启动Memcached服务,并且配置它随机启动。
# systemctl enable memcached.service
# systemctl start memcached.service
注:至此OpenStack基础环境已基本搭建完成。
OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 2.安装配置OpenStack基础服务的更多相关文章
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 3.安装配置OpenStack认证服务(keystone)
节点配置信息说明: 控制节点:controller: IP:192.168.164.128 hostname&hosts:likeadmin 计算加点:Nova: IP:192.168.164 ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 1.操作系统环境配置
1.OpenStack示例的架构介绍 1.1 各节点介绍 (1)控制节点(controller)控制节点(controller)上运行身份服务,镜像服务,计算节点管理,网络管理,各种网络代理和仪表板. ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 8.仪表盘 Dashboard(horizon)安装配置
仪表盘Dashboard(horizon)是一个web接口,使得云平台管理员以及用户可以管理不同的Openstack资源以及服务.这个部署示例使用的是 Apache Web 服务器. 节点配置信息说明 ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 —9.块存储服务(cinder)部署配置
块存储服务部署相关块存储服务(cinder)为实例提供块存储.存储的分配和消耗是由块存储驱动器,或者多后端配置的驱动器决定的.还有很多驱动程序可用:NAS/SAN,NFS,ISCSI,Ceph等.典型 ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 —7.网络服务Neutron配置
网络服务Neutron本章节结束如何安装并配置网络服务(neutron)采用:ref:`provider networks <network1>`或:ref:`self-service n ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 6.在计算节点上安装并配置计算服务Nova
安装和配置计算节点这个章节描述如何在计算节点上安装和配置计算服务. 计算服务支持几种不同的 hypervisors.为了简单起见,这个配置在计算节点上使用 :KVM <kernel-based ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 5.在控制节点上部署计算服务Nova
计算服务Nova使用OpenStack Compute来托管和管理云计算系统. OpenStack Compute是基础架构即服务(IaaS)系统的主要部分. 主要模块用Python实现.OpenSt ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 4.镜像服务(glance)
节点配置信息说明: 控制节点:controller: IP:192.168.164.128 hostname&hosts:likeadmin 计算加点:Nova: IP:192.168.164 ...
- hadoop集群环境搭建之安装配置hadoop集群
在安装hadoop集群之前,需要先进行zookeeper的安装,请参照hadoop集群环境搭建之zookeeper集群的安装部署 1 将hadoop安装包解压到 /itcast/ (如果没有这个目录 ...
随机推荐
- Python介绍与安装
Python 是一种面向对象的解释型程序设计语言,支持支持面向过程.函数式和面向对象编程.另外,Python可以在Windows.UNIX等多个操作系统上使用. 为什么学编程 编程是一种工具,可以实现 ...
- MYSQL性能优化(3)
优化数据库对象 1.优化表的数据类型 select * from tbl1 procedure analyse(16,256) ,会输出优化建议,结合情况优化 2.拆分表(仅Myisam) 2.1 纵 ...
- LAMP架构
LAMP(linux,apache,mysql,php)是linux系统下常用的网站架构模型,用来运行PHP网站.(这得apache是httpd服务),这些服务可以安装同意主机上,也可以安装不同主机上 ...
- 《DOM Scripting》学习笔记-——第二章 js语法
<Dom Scripting>学习笔记 第二章 Javascript语法 本章内容: 1.语句. 2.变量和数组. 3.运算符. 4.条件语句和循环语句. 5.函数和对象. 语句(stat ...
- [leetcode]90. Subsets II数组子集(有重)
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the ...
- redis 3.2.1 centos7
设置外网访问 vmare:centos7redis:3.2.1 redis-cli shutdown 重启./redis-server 启动服务 启动之后无法访问 cd redis-3.2.1 vim ...
- 【转】Cron表达式详解
Cron表达式是一个字符串,字符串以5或6个空格隔开,分为6或7个域,每一个域代表一个含义,Cron有如下两种语法格式: (1) Seconds Minutes Hours DayofMonth Mo ...
- elk kibana查询语法
elk日志系统中kibana查询语法 单项term查询 例: 搜 Dahlen, Malone 字段field查询 field:value 例:city:Keyport, age:26 通配符 ? 匹 ...
- maven 监理web war 项目
- [SoapUI] 在SoapUI中,设置开关批量保存整个Response,作为期望结果进行校验
//获取保存response的文件路径和名称 def testSuiteName = context.testCase.testSuite.name def testCaseName = contex ...