首页 > 代码库 > Openstack 实战讲解之-----------01-基础环境安装
Openstack 实战讲解之-----------01-基础环境安装
本次使用的环境如下:
Linux-node1 | ip:192.168.56.11 | 控制节点 |
Linux-node2 | ip:192.168.56.12 | 计算节点 |
设置主机名解析
[root@linux-node1 ~]# 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仓库和常用命令
[root@linux-node1 ~]# rpm -ivh http://mirrors.aliyun.com/epel ... h.rpm [root@linux-node1 ~]# 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和防火墙
[root@linux-node1 ~]# systemctl disable firewalld [root@linux-node1 ~]# systemctl stop NetworkManager
4.关闭SELinux
[root@linux-node1 ~]# vim /etc/sysconfig/selinux SELINUX=disabled #修改为disabled
检查结果如下
[root@linux-node1 ~]# 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数据库中的配置文件有一条指定了保护这个路径下面的配置文件,如下:
[root@linux-node1 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-基础环境安装
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。