Advertisement
niammuddin

install unbound from source

Dec 27th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. wget https://nlnetlabs.nl/downloads/unbound/unbound-latest.tar.gz
  2. tar xzf unbound-latest.tar.gz
  3.  
  4. apt install -y build-essential
  5. apt install -y libssl-dev
  6. apt install -y libexpat1-dev
  7. apt install -y bison && flex
  8. apt install -y flex
  9.  
  10. ./configure
  11.  
  12. useradd -U -r -d /usr/local/etc/unbound -m -s /usr/sbin/nologin unbound
  13. usermod -g unbound unbound
  14.  
  15. ========================================================================================
  16. if test ":" != ":"; then \
  17. echo "#include \"config.h\"" > util/configlexer.c ;\
  18. echo "#include \"util/configyyrename.h\"" >> util/configlexer.c ;\
  19. : -t ./util/configlexer.lex >> util/configlexer.c ;\
  20. fi
  21. /bin/bash ./install-sh -m 755 -d /usr/local/lib
  22. /bin/bash ./install-sh -m 755 -d /usr/local/include
  23. /bin/bash ./install-sh -m 755 -d /usr/local/share/man
  24. /bin/bash ./install-sh -m 755 -d /usr/local/share/man/man3
  25. /bin/bash ./install-sh -c -m 644 doc/libunbound.3 /usr/local/share/man/man3
  26. for mpage in ub_ctx ub_result ub_ctx_create ub_ctx_delete \
  27. ub_ctx_set_option ub_ctx_get_option ub_ctx_config ub_ctx_set_fwd \
  28. ub_ctx_resolvconf ub_ctx_hosts ub_ctx_add_ta ub_ctx_add_ta_file \
  29. ub_ctx_trustedkeys ub_ctx_debugout ub_ctx_debuglevel ub_ctx_async \
  30. ub_poll ub_wait ub_fd ub_process ub_resolve ub_resolve_async ub_cancel \
  31. ub_resolve_free ub_strerror ub_ctx_print_local_zones ub_ctx_zone_add \
  32. ub_ctx_zone_remove ub_ctx_data_add ub_ctx_data_remove; \
  33. do \
  34. echo ".so man3/libunbound.3" > /usr/local/share/man/man3/$mpage.3 ; \
  35. done
  36. ./libtool --mode=install cp unbound.h /usr/local/include/unbound.h
  37. libtool: install: cp unbound.h /usr/local/include/unbound.h
  38. /bin/bash ./install-sh -m 755 -d /usr/local/lib/pkgconfig
  39. /bin/bash ./install-sh -m 644 contrib/libunbound.pc /usr/local/lib/pkgconfig
  40. ./libtool --mode=install cp libunbound.la /usr/local/lib
  41. libtool: install: cp .libs/libunbound.so.8.1.20 /usr/local/lib/libunbound.so.8.1.20
  42. libtool: install: (cd /usr/local/lib && { ln -s -f libunbound.so.8.1.20 libunbound.so.8 || { rm -f libunbound.so.8 && ln -s libunbound.so.8.1.20 libunbound.so.8; }; })
  43. libtool: install: (cd /usr/local/lib && { ln -s -f libunbound.so.8.1.20 libunbound.so || { rm -f libunbound.so && ln -s libunbound.so.8.1.20 libunbound.so; }; })
  44. libtool: install: cp .libs/libunbound.lai /usr/local/lib/libunbound.la
  45. libtool: install: cp .libs/libunbound.a /usr/local/lib/libunbound.a
  46. libtool: install: chmod 644 /usr/local/lib/libunbound.a
  47. libtool: install: ranlib /usr/local/lib/libunbound.a
  48. libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /usr/local/lib
  49. ----------------------------------------------------------------------
  50. Libraries have been installed in:
  51. /usr/local/lib
  52.  
  53. If you ever happen to want to link against installed libraries
  54. in a given directory, LIBDIR, you must either use libtool, and
  55. specify the full pathname of the library, or use the '-LLIBDIR'
  56. flag during linking and do at least one of the following:
  57. - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
  58. during execution
  59. - add LIBDIR to the 'LD_RUN_PATH' environment variable
  60. during linking
  61. - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
  62. - have your system administrator add LIBDIR to '/etc/ld.so.conf'
  63.  
  64. See any operating system documentation about shared libraries for
  65. more information, such as the ld(1) and ld.so(8) manual pages.
  66. ----------------------------------------------------------------------
  67. ./libtool --mode=finish /usr/local/lib
  68. libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /usr/local/lib
  69. ----------------------------------------------------------------------
  70. Libraries have been installed in:
  71. /usr/local/lib
  72.  
  73. If you ever happen to want to link against installed libraries
  74. in a given directory, LIBDIR, you must either use libtool, and
  75. specify the full pathname of the library, or use the '-LLIBDIR'
  76. flag during linking and do at least one of the following:
  77. - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
  78. during execution
  79. - add LIBDIR to the 'LD_RUN_PATH' environment variable
  80. during linking
  81. - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
  82. - have your system administrator add LIBDIR to '/etc/ld.so.conf'
  83.  
  84. See any operating system documentation about shared libraries for
  85. more information, such as the ld(1) and ld.so(8) manual pages.
  86. ----------------------------------------------------------------------
  87. /bin/bash ./install-sh -m 755 -d /usr/local/sbin
  88. /bin/bash ./install-sh -m 755 -d /usr/local/share/man
  89. /bin/bash ./install-sh -m 755 -d /usr/local/share/man/man8
  90. /bin/bash ./install-sh -m 755 -d /usr/local/share/man/man5
  91. /bin/bash ./install-sh -m 755 -d /usr/local/share/man/man1
  92. ./libtool --mode=install cp -f unbound /usr/local/sbin/unbound
  93. libtool: install: cp -f unbound /usr/local/sbin/unbound
  94. ./libtool --mode=install cp -f unbound-checkconf /usr/local/sbin/unbound-checkconf
  95. libtool: install: cp -f unbound-checkconf /usr/local/sbin/unbound-checkconf
  96. ./libtool --mode=install cp -f unbound-control /usr/local/sbin/unbound-control
  97. libtool: install: cp -f unbound-control /usr/local/sbin/unbound-control
  98. ./libtool --mode=install cp -f unbound-host /usr/local/sbin/unbound-host
  99. libtool: install: cp -f .libs/unbound-host /usr/local/sbin/unbound-host
  100. ./libtool --mode=install cp -f unbound-anchor /usr/local/sbin/unbound-anchor
  101. libtool: install: cp -f .libs/unbound-anchor /usr/local/sbin/unbound-anchor
  102. /bin/bash ./install-sh -c -m 644 doc/unbound.8 /usr/local/share/man/man8
  103. /bin/bash ./install-sh -c -m 644 doc/unbound-checkconf.8 /usr/local/share/man/man8
  104. /bin/bash ./install-sh -c -m 644 doc/unbound-control.8 /usr/local/share/man/man8
  105. /bin/bash ./install-sh -c -m 644 doc/unbound-control.8 /usr/local/share/man/man8/unbound-control-setup.8
  106. /bin/bash ./install-sh -c -m 644 doc/unbound-anchor.8 /usr/local/share/man/man8
  107. /bin/bash ./install-sh -c -m 644 doc/unbound.conf.5 /usr/local/share/man/man5
  108. /bin/bash ./install-sh -c -m 644 doc/unbound-host.1 /usr/local/share/man/man1
  109. /bin/bash ./install-sh -c -m 755 unbound-control-setup /usr/local/sbin/unbound-control-setup
  110. if test ! -e /usr/local/etc/unbound/unbound.conf; then /bin/bash ./install-sh -d `dirname /usr/local/etc/unbound/unbound.conf`; /bin/bash ./install-sh -c -m 644 doc/example.conf /usr/local/etc/unbound/unbound.conf; fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement