Centos7 OpenStack环境安装

Ifcofnig vim命令

Centos7最小化安装后如没有ifconfig vim命令,执行:

1 yum install -y net-tools vim

修改网卡名称

vim /etc/default/grub增加 “net.ifnames=0 biosdevname=0”

grub2-mkconfig -o /boot/grub2/grub.cfg

cd /etc/sysconfig/network-scripts/

mv ifcfg-enp1s0 ifcfg-eth0

sed -i 's/enp1s0/eth0/g' ifcfg-eth0

修改完后重启reboot,开机后ifconfig检查

关闭防火墙

CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。

firewall:

systemctl start firewalld.service#启动firewall

systemctl stop firewalld.service#停止firewall systemctl disable firewalld.service#禁止firewall开机启动

修改三台主机的hosts文件

vim /etc/hosts

# controller

192.168.116.8   controller

# compute1

192.168.116.7   compute1

 # compute2

 192.168.116.10  compute2

 #测试配置是否成功

 ping controller

 ping compute1

 ping compute2

安装ntp

   #每台都要装

 yum install -y ntp

 #修改控制器的ntp

 vim /etc/ntp.conf

 restrict 192.168.116.0 mask 255.255.255.0 nomodify notrap

 #只有ntp服务器同步成功后,ntp客户端才能够同步到ntp服务器的时间

 server  127.127.1.0     # local clock

 #节点服务器删除 server配置

 #添加   

 server 192.168.116.7 iburst

fudge 192.168.116.7 stratum estrict controller nomodify notrap noquery #全部修改完毕添加为开机自启并立即启动 systemctl enable ntpd.service

生成安全密码的命令

openssl rand -hex 

以下在所有的服务器上操作

安装yum插件,优先级包,使系统信息库中的相对优先级分配:

yum install yum-plugin-priorities

安装 EPEL库与RDO库

yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm \
http://rdo.fedorapeople.org/openstack-juno/rdo-release-juno.rpm

升级你的系统上的软件包

yum upgrade -y

安装OpenStack的SELinux的包自动为OpenStack的服务管理安全策略:

yum install openstack-selinux -y

数据库只装一台即可

该数据库通常运行在控制器节点上

安装和配置数据库服务器

yum install -y mariadb mariadb-server MySQL-python

新建并编辑/etc/my.cnf.d/mariadb_openstack.cnf文件

vim /etc/my.cnf.d/mariadb_openstack.cnf

[mysqld]

bind-address = 192.168.116.8

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
systemctl status mariadb.service

安装数据库服务,包括选择合适的密码root帐户:

# 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):
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!

1.Openstack-环境安装的更多相关文章

  1. 一、OpenStack环境准备及共享组件安装

    一.OpenStack部署环境准备: 1.关闭防火墙所有虚拟机都要操作 # setenforce 0 # systemctl stop firewalld 2.域名解析所有虚拟机都要操作 # cat ...

  2. Openstack 10 云环境安装

    概述 资源规划 Undercloud Installation Overcloud Installation Trouble Shooting 附录 本指南介绍了如何使用 Red Hat OpenSt ...

  3. 在openstack环境中安装rackspace private cloud --1 环境准备

    在一个openstack环境中安装rackspace private cloud, 环境准备: 在good-net网络中创建3个虚拟机vm Network Detail: good-net Netwo ...

  4. 用命令测试安装好的OpenStack环境

    OpenStack三个节点icehouse-gre模式部署一文部署了一套OpenStack环境,接下来使用命令测试一遍. 首先要明确几个概念: 外网:可分配floating ip绑定到虚拟机,外部就可 ...

  5. 安装配置好openstack环境的虚拟机,须要改动ip时,在数据库中同步改动ip的方法

    感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限,错误之处在所难免,欢迎指正. 假设转载,请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167 原博文地 ...

  6. OpenStack使用Bosh部署CloudFoundry(一)—准备OpenStack环境

    版本说明: CloudFoundry:V2版本 OpenStack:Folsom或者Grizzly版本 本篇文章采用OpenStack Folsom+nova-network的OpenStack环境, ...

  7. openstack一键安装脚本(转载)

    #!/bin/sh # openstack pike 单机 一键安装 # 环境 centos 7.4.1708 x86_64 # 更多内容 http://dwz.cn/openstack # Myde ...

  8. Python系列:一、Python概述与环境安装--技术流ken

    Python简介 Python是一种计算机程序设计语言.是一种动态的.面向对象的脚本语言,最初被设计用于编写自动化脚本(shell),随着版本的不断更新和语言新功能的添加,越来越多被用于独立的.大型项 ...

  9. Ubuntu 12.04 Openstack Essex 安装(单节点)

    这是陈沙克一篇非常好的博文,当时在进行openstack排错的时候,多亏了这篇文章里面有些内容 帮我找到了问题的所在: 原文:http://www.chenshake.com/ubuntu-12-04 ...

  10. OpenStack入门篇(六)之OpenStack环境准备

    一.Openstack的概述 Openstack是一个由NASA(美国国家航空航天局)和Rackspace合作研发并发起的,以Apache许可证授权的自由软件和开放源代码项目. Openstack是一 ...

随机推荐

  1. 笔记-python-lib-lxml

    笔记-python-lib-lxml 1.      lxml简介 lxml是一个实现解析网页文件的库,python中自带有解析库,但没有lxml方便好用. The lxml XML toolkit ...

  2. ElasticSearch 环境安装

    1)官网安装教程: http://www.elasticsearch.org/guide/reference/setup/installation/   2)简单安装: http://log.medc ...

  3. python os模块练习题

    # 1.获取某个文件所在目录的上一级目录. # 例如'D:\python\projects\test19.py'目录的结果 :D:\python\projects # 方法1 # path = os. ...

  4. RandomAecessFile open failed: EISDIR (Is a directory)

    今天下午搞断点续传,下载文件的时候,弄了一下,我把下载的文件命名为plug.jar.后来老是报错: open failed: EISDIR (Is a directory) 我烦了,两个小时啊,我操. ...

  5. MySQL之查询性能优化(一)

    为什么查询速度会慢 通常来说,查询的生命周期大致可以按照顺序来看:从客户端,到服务器,然后在服务器上进行解析,生成执行计划,执行,并返回结果给客户端.其中“执行”可以认为是整个生命周期中最重要的阶段, ...

  6. 找出Xcode没有使用的图片

    #! /bin/sh PROJ=`find . -name '*.xib' -o -name '*.[mh]'` for png in ` find . -name '*.png'` do name ...

  7. 《Cracking the Coding Interview》——第18章:难题——题目11

    2014-04-29 04:30 题目:给定一个由‘0’或者‘1’构成的二维数组,找出一个四条边全部由‘1’构成的正方形(矩形中间可以有‘0’),使得矩形面积最大. 解法:用动态规划思想,记录二维数组 ...

  8. 《Cracking the Coding Interview》——第5章:位操作——题目3

    2014-03-19 05:57 题目:给定一个整数N,求出比N大,而且二进制表示中和N有相同个数的‘1’的最小的数,比如3是‘11’,接下来的5是‘101’,再接下来的6是‘110’. 解法:从低位 ...

  9. 【Adaptive Boosting】林轩田机器学习技法

    首先用一个形象的例子来说明AdaBoost的过程: 1. 每次产生一个弱的分类器,把本轮错的样本增加权重丢入下一轮 2. 下一轮对上一轮分错的样本再加重学习,获得另一个弱分类器 经过T轮之后,学得了T ...

  10. python3知识点之---------列表的介绍

    1.列表是什么? 它是由一系列特定顺序排序的元素组成.元素可以表示一切任何的事物,元素之间可以没有任何关系.列表用方括号[ ] 表示,元素之间由逗号隔开.   例如表示一系列数字的列表:  numbe ...