1
0

shadowsocks-libev.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/bash
  2. # Pure Compilation of Shadowsocks-libev for Debian / Ubuntu
  3. if [ -e /etc/debian_version ]; then
  4. # install base soft
  5. apt update && apt install -y ca-certificates wget curl unzip xz vim htop tmux
  6. ## Debian / Ubuntu build-essential
  7. apt install -y git gettext build-essential autoconf libtool libpcre3-dev automake
  8. else
  9. echo " Centos 7 Usage another Script! "
  10. echo "Usage: bash <(curl -L -s git.io/fhExJ) update "
  11. exit
  12. fi
  13. # Installation of [ asciidoc xmlto c-ares-devel libev-devel ]
  14. mkdir -p ~/libev_ss && cd ~/libev_ss
  15. wget https://jaist.dl.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.zip
  16. unzip -o asciidoc-8.6.9.zip
  17. cd asciidoc-8.6.9
  18. ./configure
  19. make
  20. make install
  21. cd ~/libev_ss
  22. wget https://releases.pagure.org/xmlto/xmlto-0.0.28.tar.gz
  23. tar xf xmlto-0.0.28.tar.gz
  24. cd xmlto-0.0.28
  25. ./configure
  26. make
  27. make install
  28. cd ~/libev_ss
  29. wget https://c-ares.haxx.se/download/c-ares-1.15.0.tar.gz
  30. tar xf c-ares-1.15.0.tar.gz
  31. cd c-ares-1.15.0
  32. ./configure
  33. make
  34. make install
  35. cd ~/libev_ss
  36. wget http://deb.debian.org/debian/pool/main/libe/libev/libev_4.22.orig.tar.gz
  37. tar xf libev_4.22.orig.tar.gz
  38. cd libev-4.22/
  39. ./configure
  40. make
  41. make install
  42. cd ~/libev_ss
  43. # Installation of MbedTLS
  44. wget http://deb.debian.org/debian/pool/main/m/mbedtls/mbedtls_2.16.0.orig.tar.xz
  45. tar xf mbedtls_2.16.0.orig.tar.xz
  46. cd mbedtls-2.16.0/
  47. make
  48. make install
  49. cd ~/libev_ss
  50. # Installation of libsodium
  51. git clone https://github.com/jedisct1/libsodium --depth=1
  52. cd libsodium/
  53. ./autogen.sh
  54. ./configure
  55. make
  56. make install
  57. # configure dynamic linker run time bindings
  58. ldconfig
  59. cd ~
  60. # Start building Shadowsocks-libev
  61. git clone --recursive https://github.com/shadowsocks/shadowsocks-libev --depth=1
  62. cd shadowsocks-libev
  63. git submodule update --init --recursive
  64. ./autogen.sh
  65. ./configure
  66. make
  67. make install
  68. /usr/local/bin/ss-server -v