openstack 入门 【准备篇】二:基础环境的搭建和配置【centos】 M版本

前端之家收集整理的这篇文章主要介绍了openstack 入门 【准备篇】二:基础环境的搭建和配置【centos】 M版本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.配置防火墙和 Selinux


编辑 @H_404_16@selinux 文件
@H_404_16@Vi /etc/selinux/config
SELINUX=permissive
关闭防火墙并设置开机不自起
@H_404_16@#Systemctl stop firewalld.service
#Systemctl disable firewalld.service

@H_404_16@

@H_404_16@
2.安装 ntp 服务


1controller compute 节点
@H_404_16@#yum -y install ntp

@H_404_16@
2)配置 controller 节点


编辑/etc/ntp.conf 文件
添加以下内容
server 127.127.1.0
fudge 127.127.1.0 stratum 10
启动 ntp 服务器
#service ntpd start
#chkconfig ntpd on


3)配置 compute 节点
#ntpdate controller
#chkconfig ntpdate on


启用OpenStack库

  • 在CentOS中,``extras``仓库提供用于启用 OpenStack 仓库的RPM包。 CentOS 默认启用``extras``仓库,因此你可以直接安装用于启用OpenStack仓库的包。

    #yuminstallcentos-release-openstack-mitaka
  • 在RHEL上,下载和安装RDO仓库RPM来启用OpenStack仓库。

    #yuminstallhttps://rdoproject.org/repos/rdo-release.rpm

完成安装

在主机上升级包:

#yumupgrade


注解


如果更新了一个新内核,重启主机来使用新内核。

安装 OpenStack 客户端:

#yuminstallpython-openstackclient

RHEL 和 CentOS 默认启用了SELinux. 安装openstack-selinux软件包以便自动管理 OpenStack 服务的安全策略:

#yuminstallopenstack-selinux





3.安装 MysqL 数据库服务
@H_404_16@# yum install MysqL MysqL-server MysqL-python
修改 @H_404_16@/etc/my.cnf 文件@H_404_16@[MysqLd]添加


@H_404_16@default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

@H_404_16@
启动服务
@H_404_16@#systemctl enable mariadb.service
#systemctl start mariadb.service
配置 @H_404_16@MysqL
@H_404_16@#MysqL_secure_installation
enter确认后设置数据库root密码
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


2compute 节点
@H_404_16@#yum -y install MysqL-python
1.11 安装 Mongo 数据库服务
@H_404_16@#yum install -y mongodb-server mongodb
编辑 @H_404_16@/etc/mongod.conf 文件
删除
@H_404_16@bind_ip
修改
@H_404_16@smallfiles = true
#systemctl enable mongod.service
#systemctl start mongod.service

@H_404_16@
4.安装 RabbitMQ 服务
@H_404_16@# yum install -y rabbitmq-server
systemctl enable rabbitmq-server.service
systemctl restart rabbitmq-server.service
rabbitmqctl add_user openstack 000000
rabbitmqctl set_permissions openstack ".*" ".*" ".*"

@H_404_16@

@H_404_16@
5.安装 memcahce
@H_404_16@#yum install memcached python-memcached
systemctl enable memcached.service
systemctl restart memcached.service

@H_404_16@

@H_404_16@

@H_404_16@6.安装Mongol数据库

@H_404_16@#yum install -y mongodb-server mongodb
编辑 /etc/mongod.conf 文件
删除
bind_ip
修改
smallfiles = true#systemctl enable mongod.service#systemctl start mongod.service

猜你在找的CentOS相关文章