OpenStack实战系列--搭建基本环境

  • 安装Centos7.4系统及优化

安装系统步骤,这里就不赘述,以下优化流程

1
2
3
4
5
6
7
8
cat > /etc/sysconfig/grub <<EOF
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb net.ifnames=0 biosdevname=0 quiet"
GRUB_DISABLE_RECOVERY="true"
EOF

grub2-mkconfig -o /boot/grub2/grub.cfg

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
yum install -y wget

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum install -y net-tools vim tcpdump
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0
echo ' * - nofile 100000 ' >>/etc/security/limits.conf
yum update -y

cat > /etc/hosts <<EOF
172.16.6.220 controller
172.16.6.230 compute1
172.16.6.240 block1
172.16.6.250 object1
EOF

yum install https://rdoproject.org/repos/rdo-release.rpm -y yum install centos-release-openstack-newton python-openstackclient -y   参看官方文档https://docs.openstack.org/mitaka/zh\_CN/install-guide-rdo/