VPP学习——安装(一)
虚拟机Ubuntu-VPP-DPDK安装(源码)
前置:我这里在vm安装,网络适配器为“桥接模式”(复制物理网络连接网络✔️)。这里的步骤是在刚安装好ubuntu虚拟机下,本人新手,装了好久,学习记录。
1.安装Ubuntu:版本:Ubuntu 20.04.4(当时最新系统)
2.更新apt:sudo apt update
3.安装git、vim:sudo apt install git、sudo apt install vim
4.添加源(解决源找不到问题):sudo vim /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
5.安装一些必要的软件
sudo apt install make
sudo apt install make-guile
sudo apt install openssh-server
6.下载vpp源码 :git clone http://gerrit.fd.io/r/vpp(速度较慢)
7.安装依赖:
cd vpp
make install-dep
make install-ext-deps #时间较长
8.编译:make build (也可执行:./extras/vagrant/build.sh)、make pkg-deb
9.自动配置大页:dpkg -i build-root/*.deb
10.安装DPDK
sudo apt install meson
sudo apt install -y python3-pyelftools python-pyelftools
git clone https://gitee.com/yaozuluo/dpdk.git
cd dpdk
meson -Dexamples=all build
11.安装工具:sudo apt install systemctl
12.启动VPP,暂且不用配置其他文件,只是看到VPP运行
systemctl enable vpp
systemctl start vpp
systemctl status vpp.service
13.测试是否安装成功:sudo vppctl
借鉴来源:
- https://www.cxybb.com/article/weixin_30662011/95663852
- https://www.cnblogs.com/APeng2019/p/10719308.html
- https://www.jianshu.com/p/11541acd0f9a
- https://zhuanlan.zhihu.com/p/394130758
- https://www.tqwba.com/x_d/jishu/28618.html
- https://blog.youkuaiyun.com/qieruoyi/article/details/106016861