OpenStack Train版-1.环境安装
Posted lxc123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenStack Train版-1.环境安装相关的知识,希望对你有一定的参考价值。
OpenStack Train版-1.安装基础环境&服务
1. 基础环境
1.1 主机名&ip
IP地址 主机名 配置
10.0.0.11 controller 4C8G
10.0.0.31 compute01 4C8G
1.2 ntp时间同步
[root@controller ~]# yum install chrony -y
[root@controller ~]# vim /etc/chrony.conf
allow 10.0.0.0/24
[root@controller ~]# systemctl restart chronyd.service
[root@controller ~]# systemctl enable chronyd.service
1.3 关闭防火墙 selinux
systemctl stop firewalld
1.4 安装train版yum源
[root@controller ~]# yum install centos-release-openstack-train -y
2.安装客户端【controller节点】
[root@controller ~]# yum install python-openstackclient -y
3.安装数据库【controller节点】
yum install mariadb mariadb-server python2-Pymysql -y
cat > /etc/my.cnf.d/openstack.cnf << EOF
[mysqld]
bind-address = 10.0.0.11
default-storage-engine = innodb #默认存储引擎
innodb_file_per_table = on #每张表独立表空间文件
max_connections = 4096 #最大连接数
collation-server = utf8_general_ci #默认字符集
character-set-server = utf8
EOF
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation
回车--->n--->一路y
4.安装消息队列服务【controller节点】
[root@controller ~]# yum install rabbitmq-server -y
[root@controller ~]# systemctl enable rabbitmq-server.service
[root@controller ~]# systemctl start rabbitmq-server.service
创建用户
[root@controller ~]# rabbitmqctl add_user openstack RABBIT_PASS
Creating user "openstack"
授予权限
[root@controller ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/"
安装好之后,使用netstat -tnlup 查看,如果有下图所示的25672和5672端口,则表示安装成功。
5.安装memcache【controller节点】
yum install memcached python-memcached -y
sed -i ‘/OPTIONS/cOPTIONS="-l 0.0.0.0"‘ /etc/sysconfig/memcached
systemctl enable memcached.service
systemctl start memcached.service
安装和启动好之后,同样使用netstat -tnlup查看端口情况,看到11211端口有程序在侦听则表示memcache安装成功
6.安装etcd【controller节点】
yum install etcd -y
cp -a /etc/etcd/etcd.conf{,.bak}
cat > /etc/etcd/etcd.conf <<EOF
#[Member]
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="http://10.0.0.11:2380"
ETCD_LISTEN_CLIENT_URLS="http://10.0.0.11:2379"
ETCD_NAME="controller"
#[Clustering]
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://10.0.0.11:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://10.0.0.11:2379"
ETCD_INITIAL_CLUSTER="controller=http://10.0.0.11:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"
ETCD_INITIAL_CLUSTER_STATE="new"
EOF
systemctl enable etcd
systemctl start etcd
安装和启动好之后,同样使用netstat -tnlup查看端口情况,看到2379和2380端口有程序在侦听则表示etcd安装成功
以上是关于OpenStack Train版-1.环境安装的主要内容,如果未能解决你的问题,请参考以下文章
#打卡不停更#[图文并茂]Packstack部署train版openstack
OpenStack 运维 - 部署Keystone组件 [Train版]