openstack notes (ii) build environment

1.Centos7 system installation

System version: CentOS-7-x86_64-DVD-1511.iso virtual machine configuration: 2C-4G-20G-NAT system Installation Notes:

  • NIC name: eth0
  • Time zone: Asia Shanghai
  • Security Group Policy (firewall): Close
  • Minimizing installation

1.1 modify the card name

1.1.1 Method One

Use the kernel command when you install net.ifnames=0 biosdevname=0the card name can be changed to traditional naming ethx

1.1.2 Method Two

The following quote from RHEL7 / centos7 name to modify the network card eth0

According to Red Hat official document describes the device renaming process is as follows:

A rule in /usr/lib/udev/rules.d/60-net.rules instructs the udev helper utility,/lib/udev/rename_device,to look into all /etc/sysconfig/networkscripts/ifcfg-suffix files.If it finds an ifcfg file with a HWADDR entry matching the MAC address of an interface it renames the interface to the name given in the ifcfg file by the DEVICE directive.

Rules allow udev /usr/lib/udev/rules.d/60-net.rules file help tools / lib / udev / renamedevice View all / etc / sysconfig / networkscripts / ifcfg-suffix file. If it is found HWADDR ifcfg file contains the MAC address entry matches an interface, the interface which will rename the file name given by the ifcfg DEVICE command.

According to the above description, rename the network card:

1.ifconfig command to view the card configuration

[root@test01 ~]# ifconfig 
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet 192.168.56.101  netmask 255.255.255.0  broadcast 192.168.56.255
inet6 fe80::a00:27ff:fea5:4fd  prefixlen 64  scopeid 0x20<link>
ether 08:00:27:a5:04:fd  txqueuelen 1000  (Ethernet)
RX packets 1213  bytes 131145 (128.0 KiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 771  bytes 86683 (84.6 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
inet6 ::1  prefixlen 128  scopeid 0x10<host>
loop  txqueuelen 0  (Local Loopback)
RX packets 1220  bytes 105112 (102.6 KiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 1220  bytes 105112 (102.6 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
复制代码

It can be seen, the network card MAC address: 08: 00: 27: a5: 04: fd

2. Rename the NIC configuration file

# 如果没有网卡配置文件,可以使用以下命令添加(命令行工具NetworkManager)       
[root@test01 network-scripts]# nmcli connection add type ethernet ifname enp0s9 con-name enp0s9 autoconnect yes 
复制代码

[root@test01 network-scripts]# mv ifcfg-enp0s9 ifcfg-eth0

3. Modify the NIC configuration file

Add HWADDR, DEVICE, NAME parameter to the configuration file.

4. Copy profile and restart 60-net.rules

[root@test01 network-scripts]# cp /usr/lib/udev/rules.d/60-net.rules /etc/udev/rules.d/
[root@test01 network-scripts]# shutdown -r 0
复制代码

1.2 manual partitioning

Practical work without having to boot and swap partitions, only one partition.

 

Partition

 

1.3 set a static IP

Added ifcfg-eth0 network card configuration file GATEWAY, IPADDR, DNS1, NETMASK, in accordance with the VMware virtual network editor configuration.

 

 

Found no vim editor, reference https://www.jianshu.com/p/96dbc05d3df1 installed

1.4 IPV6 function to open the card

Add the following parameter in the /etc/sysctl.conf file

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
复制代码

Entry into force:sysctl -p

2. Install the basic software source

The basic software installation

yum install -y wget yum-plugin-priorities

Installing the software source

  • Comes back up and delete source
[root@controller ~]# mkdir -p /data/backup/repo
[root@controller ~]# mv /etc/yum.repos.d/* /data/backup/repo
复制代码
  • Ali cloud yum install source
wget -O CentOS-Base-ali.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
复制代码
  • an examination
yum repolist
yum clean all && yum makecache fast && yum update -y
yum install tree lrzsz vim telnet net-tools bash-completion yum-utils -y
复制代码
  • Prohibit kernel upgrade
# vim/etc/yum.conf
[main]
...
exclude=kernel*
exclude=centos-release*
复制代码

3. Network Configuration

Close NetworkManager service

systemctl stop NetworkManager
systemctl disable NetworkManager
复制代码

NIC configuration changes

Join NM_CONTROLLED="no"ban NM management network, adding IPV6 Settings

Open NIC in promiscuous mode (allows a variety of data can be transferred)

[root@controller network-scripts]# ifconfig eth0 promisc

The command is set to start automatically

[root@controller network-scripts]# echo 'ifconfig eth0 promisc' >> /etc/profile

Message Service

systemctl start messagebus
systemctl enable messagebus
复制代码

Firewall

systemctl stop firewalld
systemctl disable firewalld
复制代码

selinux

vim /etc/selinux/config

The enforcing to disabled

Modify hosts

The Host Name Mapping written to the file

4.OpenStack environment to build

  • Software source configuration

Modify the source address of OpenStack cloud Ali address

wget -O /etc/yum.repos.d/Ali-pike.repo http://elven.vip/ks/openstack/Ali-queens.repo

  • an examination
yum repolist
yum makecache fast
复制代码
  • OpenStack install client

[root@controller yum.repos.d]# yum install -y python-openstackclient openstack-selinux yum-plugin-priorities openstack-utils

  • Time Synchronization
yum install ntpdate
ntpdate -u time1.aliyun.com
复制代码

Edit automatically run scripts

crontab -e

Add Content:*/5 * * * * /usr/sbin/ntpdate -u time1.aliyun.com >> /dev/null 2>&1 &

  • Take a snapshot based on the snapshot creation compute node computer

Modify ip address

Modify the host name:hostnamectl set-hostname computer

  • Computing node basic software installation

yum install -y qemu-kvm libvirt bridge-utils

  • Qemu to connect / ust / bin / qemu

ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu



Guess you like

Origin www.cnblogs.com/well-666/p/12151564.html