Centos7环境准备openstack pike的安装

发布时间:2022-04-27 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Centos7环境准备openstack pike的安装脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

本文介绍了Centos7环境准备oPEnstack pike的安装,分享给大家,具体如下:

##1.Centos7环境准备
#Centos 7 x86_64

#安装
yum -y install wget vim ntp net-tools tree openssh

#更换阿里
mv /etc/yum.repos.d/CentOS-Base.repo{,.bak}
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.COM/repo/Centos-7.repo

yum install centos-release-openstack-pike -y #安装OpenStack库
yum clean all && yum makecache #生成缓存

yum install python-openstackclient openstack-selinux python2-PyMySQL -y #OpenStack客户端
yum install openstack-utils -y #openstack工具

#关闭selinux、火墙
Systemctl stop firewalld.service
systemctl disable firewalld.service
firewall-cmd --state
sed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/config
sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/config
grep --color=auto '^SELINUX' /etc/selinux/config
setenforce 0

#设置hostname
Host=controller.www.local
hostnamectl set-hostname $Host
# hostname $Host
# echo $Host>/etc/hostname

#设置网卡(Vlan、bond等),规划好IP地址
#controller节点需要外网IP(使用其它网段IP地址)作为VNC代理

#hosts添加 ,controller也要添加
echo "10.2.1.20  controller">>/etc/hosts
echo "10.2.1.21  computer01">>/etc/hosts
echo "10.2.1.22  computer02">>/etc/hosts

#查看本机IP
ip add|sed -nr 's#^.*inet (.*)/24.*$#\1#gp'

#时间同步
/usr/sbin/ntpdate ntp6.aliyun.com 
echo "*/3 * * * * /usr/sbin/ntpdate ntp6.aliyun.com &> /dev/null" > /tmp/crontab
crontab /tmp/crontab

#升级,重启
yum update -y && reboot

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本宝典。

脚本宝典总结

以上是脚本宝典为你收集整理的Centos7环境准备openstack pike的安装全部内容,希望文章能够帮你解决Centos7环境准备openstack pike的安装所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。