Under 1.CentOS7 Openstack-Train version installed - Basic System environment settings

1. This experiment relates to two computers, one as a control node, a compute nodes

Control nodes:

    CPU: 4 nucleus

    Memory: 8G

    HDD: 64G

    NIC: 172.17.0.201

    Gateway: 172.17.0.1

    System: CentOS 7.6_x86_64

    Host Name: master

calculate node:

    CPU: 2 nuclear

    Memory: 4G

    HDD: 32G

    NIC: 172.17.0.205

    Gateway: 172.17.0.1

    System: CentOS 7.6_x86_64

    Host Name: slave

Configuring DNS (control node and the calculation nodes)

2.1. Configuring the host name

View the current hostname # hostname 
vi / etc / hostname # hostname editor

2.2. Configuring the host resolution

vi /etc/hosts             

172.17.0.201 master
172.17.0.205 slave

3. Turn off the firewall and SELinux (control node and the calculation nodes)

STOP firewalld.service systemctl 
# turn off the firewall service
disable firewalld.service systemctl 
# turn off the firewall service boot
Status firewalld.service systemctl 
# View firewall service status

setenforce 0
# temporarily stop selinux
getenforce
# View selinux state
vi / etc / selinux / config or vi / etc / sysconfig / selinux
SELINUX=enforcing 改为 SELINUX=disabled

4. Configuration YUM source (control node and the calculation nodes)

cp f /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
-O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo wget 

# prompts to be installed wget yum -y install wget minimized if the system is installed
makecache yum      
# generate cache
yum -y Update
# Update Package

5. Configure time synchronization (control node and the calculation nodes)

yum -y install chrony

5.1 The control node

we /etc/chrony.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server ntp.aliyun.com iburst
allow 172.17.0.0/24

5.2 compute nodes

we /etc/chrony.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 172.17.0.201 iburst

5.3. Restart ntp service, and set the boot

restart chronyd.service systemctl 
# restart ntp service systemctl Status chronyd.service # View ntp service status
systemctl enable chronyd.service
# Set boot ntp service

5.4 View service effect

chronyc sources

* The following is the control node state

[root@master-1 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 203.107.6.88 2 6 17 63 -418us[-1015us] +/- 31ms

6. Installation openstack-train (control node and the calculation nodes)

yum install centos-release-openstack-train -y
yum install python-openstackclient -y
yum install openstack-selinux -y

Guess you like

Origin www.cnblogs.com/dukun166/p/12156541.html