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

1.配置防火墙和 Selinux


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



2.安装 ntp 服务


1controller compute 节点
#yum -y install ntp


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 数据库服务
# yum install MysqL MysqL-server MysqL-python
修改 /etc/my.cnf 文件[MysqLd]添加


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


启动服务
#systemctl enable mariadb.service
#systemctl start mariadb.service
配置 MysqL
#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 节点
#yum -y install MysqL-python
1.11 安装 Mongo 数据库服务
#yum install -y mongodb-server mongodb
编辑 /etc/mongod.conf 文件
删除
bind_ip
修改
smallfiles = true
#systemctl enable mongod.service
#systemctl start mongod.service


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



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



6.安装Mongol数据库

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

相关文章

有时候CentOS工作在无互联网的环境下,需要在离线环境下安装一些组件,这次实现的是模拟在离线环境下安...
首先参照https://www.cnblogs.com/wdw984/p/13330074.html,来进行如何安装Centos和离线下载rpm包。 离...
有两个.NET CORE3.1网站部署在CentOS7上(内网IP是192.168.2.32),现在想实现访问http://192.168.2.32...
1、yum -y install vsftpd 安装vsftpd 2、配置vsftpd的配置文件(/etc/vsftpd/vsftpd.conf)主要修改以...
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/community/) Mysql...
第一步下载erlang环境并安装: wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_...