Centos7环境准备openstack pike的安装
本文介绍了Centos7环境准备openstackpike的安装,分享给大家,具体如下:
##1.Centos7环境准备
#Centos7x86_64
#安装
yum-yinstallwgetvimntpnet-toolstreeopenssh
#更换阿里源
mv/etc/yum.repos.d/CentOS-Base.repo{,.bak}
wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-7.repo
yuminstallcentos-release-openstack-pike-y#安装OpenStack库
yumcleanall&&yummakecache#生成缓存
yuminstallpython-openstackclientopenstack-selinuxpython2-PyMySQL-y#OpenStack客户端
yuminstallopenstack-utils-y#openstack工具
#关闭selinux、防火墙
systemctlstopfirewalld.service
systemctldisablefirewalld.service
firewall-cmd--state
sed-i'/^SELINUX=.*/cSELINUX=disabled'/etc/selinux/config
sed-i's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g'/etc/selinux/config
grep--color=auto'^SELINUX'/etc/selinux/config
setenforce0
#设置hostname
Host=controller.www.local
hostnamectlset-hostname$Host
#hostname$Host
#echo$Host>/etc/hostname
#设置网卡(Vlan、bond等),规划好IP地址
#controller节点需要外网IP(使用其它网段IP地址)作为VNC代理
#hosts添加,controller也要添加
echo"10.2.1.20controller">>/etc/hosts
echo"10.2.1.21computer01">>/etc/hosts
echo"10.2.1.22computer02">>/etc/hosts
#查看本机IP
ipadd|sed-nr's#^.*inet(.*)/24.*$#\1#gp'
#时间同步
/usr/sbin/ntpdatentp6.aliyun.com
echo"*/3****/usr/sbin/ntpdatentp6.aliyun.com&>/dev/null">/tmp/crontab
crontab/tmp/crontab
#升级,重启
yumupdate-y&&reboot
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持毛票票。