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 |
1
|
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数据库中的配置文件有一条指定了保护这个路径下面的配置文件,如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[[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 |
安装镜像服务:
1
|
yum install -y openstack-glance
|
安装计算服务:
|
安装网络资源服务:
|
今天先简单介绍所需部分服务在node1上的安装,下一篇将介绍安装服务的配置
本文转自 kesungang 51CTO博客,原文链接:http://blog.51cto.com/sgk2011/1886216,如需转载请自行联系原作者