当前位置: 移动技术网 > 网络运营>服务器>虚拟主机 > Centos7环境准备openstack pike的安装

Centos7环境准备openstack pike的安装

2019年04月18日  | 移动技术网网络运营  | 我要评论

本文介绍了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

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网