马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 zhige 于 2016-12-30 14:44 编辑
转载。原地址:http://sgk2011.blog.51cto.com/1551358/1886216 来源:“圈中一鸟” 博客
本次使用的环境如下: Linux-node1 | ip:192.168.56.11 | 控制节点 | Linux-node2 | ip:192.168.56.12 | 计算节点 |
|
|
|
设置主机名解析 [root@linux-node1 ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.56.11 linux-node1 linux-node1.example.com192.168.56.12 linux-node2 linux-node2.example.com2.安装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 tcpdumpyum 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-openstackclientyum install -y openstack-selinuxrpm -qa python-openstackclient openstack-selinux3.关闭NetworkManager和防火墙 [root@linux-node1 ~]# systemctl disable firewalld[root@linux-node1 ~]# systemctl stop NetworkManager4.关闭SELinux [root@linux-node1 ~]# vim /etc/sysconfig/selinuxSELINUX=disabled #修改为disabled检查结果如下 [root@linux-node1 ~]# getsebool getsebool: SELinux is disabled5.更新系统并重启 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
|