码迷,mamicode.com
首页 > 其他好文 > 详细

##1.Centos7环境准备--openstack

时间:2017-09-30 15:01:18      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:同步   ror   bond   sts   vim   查看本机   linux   ice   nbsp   

 

##1.Centos7环境准备

##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 -y
yum install python-openstackclient 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地址
#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

 

##1.Centos7环境准备--openstack

标签:同步   ror   bond   sts   vim   查看本机   linux   ice   nbsp   

原文地址:http://www.cnblogs.com/elvi/p/7614035.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!