1
0

shadowsocks-libev.sh 2.1 KB

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