Инструменты пользователя

Инструменты сайта

Перевод этой страницы:

ru:compilation

Требования:

Современный дистрибутив Linux
Ядро версии 2.6.25 или старше
cmake не младше версии 2.6
libcrypto-0.9.8 или старше (openssl-0.9.8)
libpcre
net-snmp-5.x (Для snmp)
liblua5.1 (для IPoE c DHCP option 82)

Загрузка:

Вы можете скачать последнюю версию исходного кода из https://sourceforge.net/projects/accel-ppp/files/latest/download?source=files или получить его из git

git clone git://git.code.sf.net/p/accel-ppp/code accel-ppp-code

или

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

Подготовка:

Создаём директорию в которой cmake выполнит генерацию исходных кодов для компиляции

mkdir /opt/accel-ppp-code/build

Переходим в созданную директорию

cd /opt/accel-ppp-code/build

Выполняем генерацию cmake

cmake [options] /path/to/accel-ppp-source

Опции сборки:

Вы можете настроить проект, чтобы включить или отключить некоторые функции, используя следующие параметры. Параметры не являются обязательными.

-DBUILD_PPTP_DRIVER=TRUE
Данная опция позволяет включить в сборку модуль ядра PPTP. Если у вас версия ядра 2.6.37 или более поздней версии этот вариант не нужен, поскольку, начиная с 2.6.37 PPTP включен в исходный код ядра.
-DBUILD_IPOE_DRIVER=TRUE
Данная опция позволяет включить в сборку модуль ядра IPoE. Этот модуль необходим, если вы хотите использовать IPoE в режиме общего интерфейса.
-DBUILD_VLAN_MON_DRIVER=TRUE
Включает в сборку драйвер позволяющий создавать vlan интерфейсы анализирую заголовки IP пакетов. (Доступен для соединений IPoE и PPPoE)
-DKDIR=/usr/src/linux
Задает путь к директории исходного кода ядра Linux. Необходимо для построения модулей ядра PPTP, IPOE, VLAN-MON
-DCMAKE_INSTALL_PREFIX=/some/location
Задает путь для установки accel-ppp. По умолчанию /usr/local.
-DLOG_PGSQL=TRUE
Данная опция позволяет включить модуль сборки логов log_pgsql, для сохранения журнала событий в базе данных PostreSQL.
-DRADIUS=FALSE
Отключение сборки модуля радиуса.
-DSHAPER=FALSE
Отключение сборки поддержки shaper.
-DNETSNMP=TRUE
Включает сборку модуля SNMP-агента.
-DLUA=TRUE
Включает поддержку Lua (полезно только для IPoE DHCP option 82).
-DCMAKE_BUILD_TYPE=Debug
Указывает, что сборка должна включать отладочную информацию. Необходима для выявления падений accel-ppp.
-DMEMDEBUG=TRUE
Указывает, что сборка должна включать дополнительную информацию, для выявления утечки памяти.

Компиляция:

После успешного выполнения CMake вы можете откомпилировать исходный код вызвав команду

make

Установка:

После успешного выполнения вы можете установить accel-ppp вызвав команду

make install

Установка драйвера IPoE:

При сборке accel-ppp с поддержкой драйвера IPoE необходимо поместить сам драйвер в системную директорию и обновить информацию о драйверах.

cp ./drivers/ipoe/driver/ipoe.ko /lib/modules/`uname -r`/kernel/net
depmod -a

Установка драйвера vlan_mon:

При сборке accel-ppp с поддержкой драйвера vlan_mon необходимо поместить сам драйвер в системную директорию и обновить информацию о драйверах.

cp ./drivers/vlan_mon/driver/vlan_mon.ko /lib/modules/`uname -r`/kernel/net
depmod -a

Типичный процесс сборки:

 $ git clone git://git.code.sf.net/p/accel-ppp/code accel-ppp-code
 $ mkdir /opt/accel-ppp-code/build
 $ cd /opt/accel-ppp-code/build
 $ cmake ..
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for timerfd_create
-- Looking for timerfd_create - found
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/accel-ppp-build
 $ make
[  1%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/md.c.o
[  2%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/timer.c.o
[  4%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/triton.c.o
[  5%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/conf_file.c.o
[  7%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/loader.c.o
[  8%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/log.c.o
[  9%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/mempool.c.o
[ 11%] Building C object accel-pppd/triton/CMakeFiles/triton.dir/event.c.o
Linking C shared library libtriton.so
[ 11%] Built target triton
[ 12%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp.c.o
[ 14%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp_fsm.c.o
[ 15%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp_lcp.c.o
[ 16%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/lcp_opt_mru.c.o
[ 18%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/lcp_opt_magic.c.o
[ 19%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/lcp_opt_pcomp.c.o
[ 21%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/lcp_opt_accomp.c.o
[ 22%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp_auth.c.o
[ 23%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp_ipcp.c.o
[ 25%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ipcp_opt_ipaddr.c.o
[ 26%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ipcp_opt_dns.c.o
[ 28%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ipv6cp_opt_intfid.c.o
[ 29%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp_ipv6cp.c.o
[ 30%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ppp_ccp.c.o
[ 32%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ppp/ccp_mppe.c.o
[ 33%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/cli/std_cmd.c.o
[ 35%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/cli/show_sessions.c.o
[ 36%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/cli/telnet.c.o
[ 38%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/cli/tcp.c.o
[ 39%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/cli/cli.c.o
[ 40%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/pwdb.c.o
[ 42%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/ipdb.c.o
[ 43%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/iprange.c.o
[ 45%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/utils.c.o
[ 46%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/log.c.o
[ 47%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/main.c.o
[ 49%] Building C object accel-pppd/CMakeFiles/accel-pppd.dir/memdebug.c.o
Linking C executable accel-pppd
[ 49%] Built target accel-pppd
[ 50%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/stat_accm.c.o
[ 52%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/dict.c.o
[ 53%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/req.c.o
[ 54%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/packet.c.o
[ 56%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/auth.c.o
[ 57%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/acct.c.o
[ 59%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/serv.c.o
[ 60%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/dm_coa.c.o
[ 61%] Building C object accel-pppd/radius/CMakeFiles/radius.dir/radius.c.o
Linking C shared library libradius.so
[ 61%] Built target radius
[ 63%] Building C object accel-pppd/ctrl/pptp/CMakeFiles/pptp.dir/pptp.c.o
Linking C shared library libpptp.so
[ 63%] Built target pptp
[ 64%] Building C object accel-pppd/ctrl/pppoe/CMakeFiles/pppoe.dir/pppoe.c.o
[ 66%] Building C object accel-pppd/ctrl/pppoe/CMakeFiles/pppoe.dir/mac_filter.c.o
[ 67%] Building C object accel-pppd/ctrl/pppoe/CMakeFiles/pppoe.dir/dpado.c.o
[ 69%] Building C object accel-pppd/ctrl/pppoe/CMakeFiles/pppoe.dir/cli.c.o
[ 70%] Building C object accel-pppd/ctrl/pppoe/CMakeFiles/pppoe.dir/tr101.c.o
Linking C shared library libpppoe.so
[ 70%] Built target pppoe
[ 71%] Building C object accel-pppd/ctrl/l2tp/CMakeFiles/l2tp.dir/l2tp.c.o
[ 73%] Building C object accel-pppd/ctrl/l2tp/CMakeFiles/l2tp.dir/dict.c.o
[ 74%] Building C object accel-pppd/ctrl/l2tp/CMakeFiles/l2tp.dir/packet.c.o
Linking C shared library libl2tp.so
[ 74%] Built target l2tp
[ 76%] Building C object accel-pppd/auth/CMakeFiles/auth_chap_md5.dir/auth_chap_md5.c.o
Linking C shared library libauth_chap_md5.so                                                                                                                                        
[ 76%] Built target auth_chap_md5
[ 77%] Building C object accel-pppd/auth/CMakeFiles/auth_mschap_v1.dir/auth_mschap_v1.c.o
Linking C shared library libauth_mschap_v1.so
[ 77%] Built target auth_mschap_v1
[ 78%] Building C object accel-pppd/auth/CMakeFiles/auth_mschap_v2.dir/auth_mschap_v2.c.o
Linking C shared library libauth_mschap_v2.so
[ 78%] Built target auth_mschap_v2
[ 80%] Building C object accel-pppd/auth/CMakeFiles/auth_pap.dir/auth_pap.c.o
Linking C shared library libauth_pap.so
[ 80%] Built target auth_pap
[ 81%] Building C object accel-pppd/logs/CMakeFiles/log_file.dir/log_file.c.o
Linking C shared library liblog_file.so
[ 81%] Built target log_file
[ 83%] Building C object accel-pppd/logs/CMakeFiles/log_syslog.dir/log_syslog.c.o
Linking C shared library liblog_syslog.so
[ 83%] Built target log_syslog
[ 84%] Building C object accel-pppd/logs/CMakeFiles/log_tcp.dir/log_tcp.c.o
Linking C shared library liblog_tcp.so
[ 84%] Built target log_tcp
[ 85%] Building C object accel-pppd/extra/CMakeFiles/chap-secrets.dir/chap-secrets.c.o
Linking C shared library libchap-secrets.so
[ 85%] Built target chap-secrets
[ 87%] Building C object accel-pppd/extra/CMakeFiles/connlimit.dir/connlimit.c.o
Linking C shared library libconnlimit.so
[ 87%] Built target connlimit
[ 88%] Building C object accel-pppd/extra/CMakeFiles/ippool.dir/ippool.c.o
Linking C shared library libippool.so
[ 88%] Built target ippool
[ 90%] Building C object accel-pppd/extra/CMakeFiles/ipv6pool.dir/ipv6pool.c.o
Linking C shared library libipv6pool.so
[ 90%] Built target ipv6pool
[ 91%] Building C object accel-pppd/extra/CMakeFiles/logwtmp.dir/logwtmp.c.o
Linking C shared library liblogwtmp.so
[ 91%] Built target logwtmp
[ 92%] Building C object accel-pppd/extra/CMakeFiles/pppd_compat.dir/pppd_compat.c.o
Linking C shared library libpppd_compat.so
[ 92%] Built target pppd_compat
[ 94%] Building C object accel-pppd/extra/CMakeFiles/shaper_tbf.dir/shaper_tbf.c.o
Linking C shared library libshaper_tbf.so
[ 94%] Built target shaper_tbf
[ 95%] Building C object accel-pppd/extra/CMakeFiles/sigchld.dir/sigchld.c.o
Linking C shared library libsigchld.so
[ 95%] Built target sigchld
[ 97%] Building C object accel-pppd/ipv6/CMakeFiles/ipv6_dhcp.dir/dhcpv6.c.o
[ 98%] Building C object accel-pppd/ipv6/CMakeFiles/ipv6_dhcp.dir/dhcpv6_packet.c.o
Linking C shared library libipv6_dhcp.so
[ 98%] Built target ipv6_dhcp
[[100%]] Building C object accel-pppd/ipv6/CMakeFiles/ipv6_nd.dir/nd.c.o
Linking C shared library libipv6_nd.so
[[100%]] Built target ipv6_nd
ru/compilation.txt · Последние изменения: 2018/06/11 21:01 — dimka88