summaryrefslogtreecommitdiff
path: root/doc/installation/debian.rst
blob: d81fbcf22a7021e8996430e3c733c028d64d7cf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Install on Debian
-----------------
**Preparation**

Before compile and build package need satisfy some dependencies

* **cmake** - open-source system that manages the build process
* **gcc** - GNU Compiler Collection (GCC) is a compiler system
* **linux-headers-`uname -r`** - source code of current installing linux kernel, need for build ipoe and vlan_mon modules. If you don`t need these modules, you may don`t install this 
* **git** - version-control system for tracking changes, (need for downloading source code) 
* **libpcre2-dev** - source code of pcre2 lib, accel-ppp need it for use reg expression
* **libssl-dev** - source code of ssl lib, accel-ppp need it for use regular expression
* **liblua5.1-0-dev** - this need for create custom username (IPoE) from packet. Script write on lua language 

.. code-block:: sh

  apt-get install -y build-essential cmake gcc linux-headers-`uname -r` git libpcre2-dev libssl-dev liblua5.1-0-dev

After install dependencies, download accel-ppp source code with git client, tree master . Master tree contain actual patches last release. 

.. code-block:: sh

  git clone https://github.com/accel-ppp/accel-ppp.git /opt/accel-ppp-code

Create directory for build source code and go to this directory. 

.. code-block:: sh

  mkdir /opt/accel-ppp-code/build
  cd /opt/accel-ppp-code/build/

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=Debian10** this arguments for building DEB package. If used debian other version, set it. For example, if used debian 9 set **-DCPACK_TYPE=Debian9**

.. code-block:: sh

  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=Debian10 ..

.. admonition:: Notice:

   ended symbols **..** sets path to accel-ppp source code, not delete this! Or you can replace it full path to accel-ppp-code like /opt/accel-ppp-code/

Compile:

.. code-block:: sh

  make 

Create DEB package:

.. code-block:: sh

  cpack -G DEB

Install package:

.. code-block:: sh

  dpkg -i accel-ppp.deb

If you have success packet install, rename config file to accel-ppp.conf

.. code-block:: sh

  mv /etc/accel-ppp.conf.dist /etc/accel-ppp.conf
  
Edit accel-ppp.conf for you schemas and run accel-ppp

**Run as systemd unit:**

.. code-block:: sh

  systemctl start accel-ppp

or run manual (not recommended)

.. code-block:: sh

  accel-pppd -d -c /etc/accel-ppp.conf -p /var/run/accel-ppp.pid


Update procedure
^^^^^^^^^^^^^^^^^