Openstack 实战讲解之-----------01-基础环境安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Openstack 实战讲解之-----------01-基础环境安装相关的知识,希望对你有一定的参考价值。
本次使用的环境如下:
Linux-node1 | ip:192.168.56.11 | 控制节点 |
Linux-node2 | ip:192.168.56.12 | 计算节点 |
设置主机名解析
[[email protected] ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.56.11 linux-node1 linux-node1.example.com 192.168.56.12 linux-node2 linux-node2.example.com
2.安装EPEL仓库和常用命令
[[email protected] ~]# rpm -ivh http://mirrors.aliyun.com/epel ... h.rpm [[email protected] ~]# yum install -y net-tools vim lrzsz tree screen lsof tcpdump yum install -y centos-release-openstack-newton 修改 openstack 源的地址为阿里云的地址(提高 yum 下载的速度) sed -i "s#mirror.centos.org#mirrors.aliyun.com#g" /etc/yum.repos.d/CentOS-OpenStack-newton.repo 安装 OpenStack 客户端 yum install -y python-openstackclient yum install -y openstack-selinux rpm -qa python-openstackclient openstack-selinux
3.关闭NetworkManager和防火墙
[[email protected] ~]# systemctl disable firewalld [[email protected] ~]# systemctl stop NetworkManager
4.关闭SELinux
[[email protected] ~]# vim /etc/sysconfig/selinux SELINUX=disabled #修改为disabled
检查结果如下
[[email protected] ~]# getsebool getsebool: SELinux is disabled
5.更新系统并重启
yum update & reboot
这里需要注意:
Centos7.3 对openstack的许多功能有不支持的,所以建议不要升级到7.3的版本
二、环境架构图
三、服务安装
3.1 控制节点服务安装
安装数据库:
yum install -y mariadb mariadb-server python2-Pymysql |
vim /etc/my.cnf.d/openstack.cnf
[mysqld] bind-address = 192.168.56.11 default-storage-engine = innodb innodb_file_per_table max_connections = 4096 collation-server = utf8_general_ci character-set-server = utf8 |
这个openstack.cnf是自己创建的配置文件,这里为什么会在my.cnf.d下面创建一个配置文件那,是因为/etc/my.cnf数据库中的配置文件有一条指定了保护这个路径下面的配置文件,如下:
[[email protected] yum.repos.d]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d
安装消息队列服务:
yum install -y rabbitmq-server |
安装keystone认证服务:
yum install -y openstack-keystone httpd mod_wsgi |
安装镜像服务:
yum install -y openstack-glance
安装计算服务:
yum install -y openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler |
安装网络资源服务:
yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables |
今天先简单介绍所需部分服务在node1上的安装,下一篇将介绍安装服务的配置
本文出自 “圈中一鸟” 博客,请务必保留此出处http://sgk2011.blog.51cto.com/1551358/1886216
以上是关于Openstack 实战讲解之-----------01-基础环境安装的主要内容,如果未能解决你的问题,请参考以下文章
Openstack 实战讲解之-----------02-控制节点服务配置
Openstack 实战讲解之-----------01-基础环境安装
Openstack 实战讲解之-----05-控制节点Nova服务安装配置
Openstack 实战讲解之-----10-图形界面管理安装配置(Dashboard)