The Centos7 environment prepares the openstack pike installation

  • 2020-10-23 20:21:45
  • OfStack

This article introduces the Centos7 environment preparation openstack pike installation, sharing to everyone, specific as follows:


##1.Centos7 Environment to prepare 
#Centos 7 x86_64

# The installation 
yum -y install wget vim ntp net-tools tree openssh

# Replacement of ali source 
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 # The installation OpenStack library 
yum clean all && yum makecache # To generate cache 

yum install python-openstackclient openstack-selinux python2-PyMySQL -y #OpenStack The client 
yum install openstack-utils -y #openstack tool 

# Shut down selinux , firewalls, 
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

# Set up the hostname
Host=controller.www.local
hostnamectl set-hostname $Host
# hostname $Host
# echo $Host>/etc/hostname

# Set the nic (Vlan , bond Etc. ) Good planning, IP address 
#controller Nodes need an extranet IP Use other segments IP Address) as VNC The agent 

#hosts add  ,controller Also want to add 
echo "10.2.1.20  controller">>/etc/hosts
echo "10.2.1.21  computer01">>/etc/hosts
echo "10.2.1.22  computer02">>/etc/hosts

# Look at the machine IP
ip add|sed -nr 's#^.*inet (.*)/24.*$#\1#gp'

# Time synchronization 
/usr/sbin/ntpdate ntp6.aliyun.com 
echo "*/3 * * * * /usr/sbin/ntpdate ntp6.aliyun.com &> /dev/null" > /tmp/crontab
crontab /tmp/crontab

# Upgrade, restart 
yum update -y && reboot

Related articles: