1、安装依赖
apt-get install -y build-essential cmake gcc linux-headers-`uname -r` git libpcre2-dev libssl-dev liblua5.1-0-dev
2、拉取版本
git clone https://github.com/accel-ppp/accel-ppp.git /opt/accel-ppp-code
3、创建编译文件夹
mkdir /opt/accel-ppp-code/build
cd /opt/accel-ppp-code/build/
4、建立编译选项
For building code need we can set next params:
- -DBUILD_IPOE_DRIVER=TRUE include IPoE module.This module need if you want use accel-ppp as shared interface.
- -DBUILD_VLAN_MON_DRIVER=TRUE include vlan monitoring module. If you want create vlan automatically on analyse IP headers with regular expression set on accel-ppp config file. (Available for IPoE and PPPoE)
- -DKDIR=/usr/src/linux-headers-
uname -r
sets path to Linux kernel source code. Need only for build IPOE, VLAN-MON. - -DCMAKE_INSTALL_PREFIX=/usr path for install executable code. If you build DEB package, not recommended change this.
- -DCPACK_TYPE=Ubuntu18 this arguments for building DEB package. If used Ubuntu other version, set it. For example, if used Ubuntu 16 set -DCPACK_TYPE=Ubuntu16
cmake -DBUILD_IPOE_DRIVER=TRUE -DBUILD_VLAN_MON_DRIVER=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DKDIR=/usr/src/linux-headers-`uname -r` -DLUA=TRUE -DCPACK_TYPE=Ubuntu18 ..
5、编译
编译成功
做编译包
cpack -G DEB
安装生成的deb
dpkg -i accel-ppp.deb
安装成功后,修改配置文件名称
mv /etc/accel-ppp.conf.dist /etc/accel-ppp.conf
修改配置文件进行试验。
运行accel-ppp
systemctl start accel-ppp