搭建openstack系统初始化(2)

操作系统环境 :Centos 7.3 x64

1).安装需要的包

yum install wget vim  chrony  net-tools  bash-completion -y

2)配置阿里elpl源和本地N版yum源

mv /etc/yum.repos.d/CentOS-Base.repo /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
vim /etc/yum.repos.d/openstack-newtron.repo
[openstack
-local] name=openstack-newtron baseurl=http://192.168.2.108/newton enabled=1 gpgcheck=0
yum clean all 
yum makecache

3)配置系统调优参数

echo -e "ulimit -SHn 65535" >> /etc/rc.local
echo "net.ipv4.ip_nonlocal_bind=1" >> /etc/rc.local
echo -e "ulimit -SHn 65535" >> /etc/profile
echo -e "* soft nofile  65535" >> /etc/security/limits.conf
echo -e "* hard nofile  65535" >> /etc/security/limits.conf
source /etc/profile

echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
echo "net.ipv4.conf.all.rp_filter=0" >> /etc/sysctl.conf
echo "net.ipv4.conf.default.rp_filter=0" >> /etc/sysctl.conf
sysctl -p
systemctl stop firewalld.service
systemctl disable firewalld.service
sed -i 's@SELINUX=enforcing@SELINUX=disabled@g' /etc/selinux/config 
setenforce 0

4)时间服务器配置

# vim /etc/chrony.conf
ntpdate time1.aliyun.com
timedatectl set-timezone Asia/Shanghai

# systemctl enable chronyd.service
# systemctl start chronyd.service

5)在所有节点安装openstack包

yum install centos-release-openstack-newton -y
yum install python-openstackclient -y
yum install openstack-selinux -y
原文地址:https://www.cnblogs.com/jimmy-xuli/p/8818463.html