openssl.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Author: yeho <lj2007331 AT gmail.com>
  3. # BLOG: https://blog.linuxeye.com
  4. #
  5. # Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
  6. #
  7. # Project home page:
  8. # https://oneinstack.com
  9. # https://github.com/lj2007331/oneinstack
  10. Install_openSSL102() {
  11. if [ ! -e "${openssl_install_dir}/lib/libcrypto.a" ]; then
  12. # install openssl-1.0.2
  13. pushd ${oneinstack_dir}/src
  14. tar xzf openssl-${openssl_version}.tar.gz
  15. pushd openssl-${openssl_version}
  16. make clean
  17. ./config --prefix=${openssl_install_dir} -fPIC shared zlib-dynamic
  18. make -j ${THREAD} && make install
  19. popd
  20. if [ -f "${openssl_install_dir}/lib/libcrypto.a" ]; then
  21. echo "${CSUCCESS}openssl-1.0.2 module installed successfully! ${CEND}"
  22. rm -rf openssl-${openssl_version}
  23. else
  24. echo "${CFAILURE}openssl-1.0.2 install failed, Please contact the author! ${CEND}"
  25. kill -9 $$
  26. fi
  27. popd
  28. fi
  29. }
  30. Install_openSSL100() {
  31. if [ ! -e '/usr/local/openssl100s/lib/libcrypto.a' ]; then
  32. pushd ${oneinstack_dir}/src
  33. tar xzf openssl-1.0.0s.tar.gz
  34. pushd openssl-1.0.0s
  35. make clean
  36. ./config --prefix=/usr/local/openssl100s -fPIC shared zlib-dynamic
  37. make -j ${THREAD} && make install
  38. popd
  39. if [ -f "/usr/local/openssl100s/lib/libcrypto.a" ]; then
  40. echo "${CSUCCESS}openssl-1.0.0s module installed successfully! ${CEND}"
  41. rm -rf openssl-1.0.0s
  42. else
  43. echo "${CFAILURE}openssl-1.0.0s install failed, Please contact the author! ${CEND}"
  44. kill -9 $$
  45. fi
  46. popd
  47. fi
  48. }