OpenStack-Train版安装基础环境&服务

OpenStack Train版-1.安装基础环境&服务

1. 基础环境

1.1 主机名&ip

IP地址	主机名
192.168.0.116	controller
192.168.0.242	compute01

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
 
cat > /etc/my.cnf.d/openstack.cnf << EOF
[mysqld]
bind-address = 192.168.0.116
 
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_ZHL
 
授予权限
[root@controller ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

安装好之后,使用netstat -tnlup 查看,如果有下图所示的25672和5672端口,则表示安装成功。
OpenStack-Train版安装基础环境&服务_第1张图片

5.安装memcache【controller节点】

yum install memcached python-memcached
 
sed -i '/OPTIONS/c\OPTIONS="-l 0.0.0.0"' /etc/sysconfig/memcached
 
systemctl enable memcached.service
systemctl start memcached.service

安装和启动好之后,同样使用netstat -tnlup查看端口情况,看到11211端口有程序在侦听则表示memcache安装成功
OpenStack-Train版安装基础环境&服务_第2张图片

6.安装etcd【controller节点】

yum install etcd -y
 
cp -a /etc/etcd/etcd.conf{,.bak}
cat > /etc/etcd/etcd.conf <

安装和启动好之后,同样使用netstat -tnlup查看端口情况,看到2379和2380端口有程序在侦听则表示etcd安装成功
OpenStack-Train版安装基础环境&服务_第3张图片

你可能感兴趣的:(OpenStack)