OVS如果进行编译安装解决依赖问题将花费很多时间,如果只是想快速的对ovs有个整体的了解,用别人编译好的rpm包和仓库将节省大量的时间。
下载阿里云数据包(curl -O大写字母O)
[root@node01 yum.repos.d]# curl -O http://mirrors.aliyun.com/repo/Centos-7.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2523 100 2523 0 0 24143 0 --:--:-- --:--:-- --:--:-- 24259
[root@node01 yum.repos.d]# curl -O http://mirrors.aliyun.com/repo/epel-7.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 664 100 664 0 0 8919 0 --:--:-- --:--:-- --:--:-- 8972
[root@node01 yum.repos.d]#
清除yum源缓存,下载新缓存
yum clean all
yum makecache
下载安装centos-release-openstack-queens包
[root@node02 yum.repos.d]# yum -y install centos-release-openstack-queens
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package centos-release-openstack-queens.noarch 0:1-2.el7.centos will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================================================
Installing:
centos-release-openstack-queens noarch 1-2.el7.centos extras 5.3 k
Transaction Summary
===============================================================================================================================================================================================================================================
Install 1 Package
Total download size: 5.3 k
Installed size: 2.2 k
Downloading packages:
centos-release-openstack-queens-1-2.el7.centos.noarch.rpm | 5.3 kB 00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : centos-release-openstack-queens-1-2.el7.centos.noarch 1/1
Verifying : centos-release-openstack-queens-1-2.el7.centos.noarch 1/1
Installed:
centos-release-openstack-queens.noarch 0:1-2.el7.centos
Complete!
此软件包会配置新的yum仓库,ovs相关的软件包在这个新配置的仓库中
查看yum源是否有openvswitch包并安装
[root@node02 yum.repos.d]# yum -y install openvswitch
Loaded plugins: fastestmirror
centos-openstack-queens | 3.0 kB 00:00:00
centos-openstack-queens/7/x86_64/primary_db | 1.2 MB 00:00:02
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package openvswitch.x86_64 1:2.11.0-4.el7 will be installed
--> Processing Dependency: librte_eal.so.9(DPDK_17.08)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_eal.so.9(DPDK_18.11)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_eal.so.9(DPDK_2.0)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_16.07)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_17.05)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_18.05)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_18.08)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_18.11)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_2.2)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mbuf.so.4(DPDK_2.1)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mempool.so.5(DPDK_16.07)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mempool.so.5(DPDK_2.0)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_meter.so.2(DPDK_18.08)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_meter.so.2(DPDK_2.0)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_ring.so.2(DPDK_2.0)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ring.so.2(DPDK_2.0)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_16.07)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_17.05)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_17.08)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_2.0)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_2.1)(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_bitratestats.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_bus_pci.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_bus_vdev.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_bus_vmbus.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_cmdline.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_eal.so.9()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_gro.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_gso.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_hash.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ip_frag.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_kvargs.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_latencystats.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mbuf.so.4()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_member.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mempool.so.5()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mempool_bucket.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mempool_ring.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_mempool_stack.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_meter.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_metrics.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_net.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pci.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pdump.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_bnxt.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_e1000.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_enic.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_failsafe.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_i40e.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_ixgbe.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_mlx4.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_mlx5.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_netvsc.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_nfp.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_qede.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_ring.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_tap.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_vdev_netvsc.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_vhost.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_pmd_virtio.so.1()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_ring.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: librte_vhost.so.4()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Processing Dependency: libunbound.so.2()(64bit) for package: 1:openvswitch-2.11.0-4.el7.x86_64
--> Running transaction check
---> Package dpdk.x86_64 0:18.11.8-1.el7_8 will be installed
---> Package unbound-libs.x86_64 0:1.6.6-5.el7_8 will be installed
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: unbound-libs-1.6.6-5.el7_8.x86_64
--> Running transaction check
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================================================
Installing:
openvswitch x86_64 1:2.11.0-4.el7 centos-openstack-queens 1.9 M
Installing for dependencies:
dpdk x86_64 18.11.8-1.el7_8 extras 1.7 M
libevent x86_64 2.0.21-4.el7 base 214 k
unbound-libs x86_64 1.6.6-5.el7_8 base 406 k
Transaction Summary
===============================================================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 4.3 M
Installed size: 13 M
Downloading packages:
(1/4): libevent-2.0.21-4.el7.x86_64.rpm | 214 kB 00:00:00
(2/4): unbound-libs-1.6.6-5.el7_8.x86_64.rpm | 406 kB 00:00:01
warning: /var/cache/yum/x86_64/7/centos-openstack-queens/packages/openvswitch-2.11.0-4.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 764429e6: NOKEY=========== ] 437 kB/s | 2.5 MB 00:00:04 ETA
Public key for openvswitch-2.11.0-4.el7.x86_64.rpm is not installed
(3/4): openvswitch-2.11.0-4.el7.x86_64.rpm | 1.9 MB 00:00:05
(4/4): dpdk-18.11.8-1.el7_8.x86_64.rpm | 1.7 MB 00:00:09
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 448 kB/s | 4.3 MB 00:00:09
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
Importing GPG key 0x764429E6:
Userid : "CentOS Cloud SIG (http://wiki.centos.org/SpecialInterestGroup/Cloud) <security@centos.org>"
Fingerprint: 736a f511 6d9c 40e2 af6b 074b f9b9 fee7 7644 29e6
Package : centos-release-openstack-queens-1-2.el7.centos.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : dpdk-18.11.8-1.el7_8.x86_64 1/4
Installing : libevent-2.0.21-4.el7.x86_64 2/4
Installing : unbound-libs-1.6.6-5.el7_8.x86_64 3/4
Installing : 1:openvswitch-2.11.0-4.el7.x86_64 4/4
Verifying : 1:openvswitch-2.11.0-4.el7.x86_64 1/4
Verifying : libevent-2.0.21-4.el7.x86_64 2/4
Verifying : dpdk-18.11.8-1.el7_8.x86_64 3/4
Verifying : unbound-libs-1.6.6-5.el7_8.x86_64 4/4
Installed:
openvswitch.x86_64 1:2.11.0-4.el7
Dependency Installed:
dpdk.x86_64 0:18.11.8-1.el7_8 libevent.x86_64 0:2.0.21-4.el7 unbound-libs.x86_64 0:1.6.6-5.el7_8
Complete!
[root@node02 yum.repos.d]#
启动openvswtich并设为开机自启(到这步openvswitch就安装完了)
systemctl start openvswitch.service
systemctl enable openvswitch.service