openssl.sh 997 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # Author: yeho <lj2007331 AT gmail.com>
  3. # BLOG: https://blog.linuxeye.cn
  4. #
  5. # Notes: OneinStack for CentOS/RadHat 6+ 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. pushd ${oneinstack_dir}/src > /dev/null
  13. tar xzf openssl-${openssl_ver}.tar.gz
  14. pushd openssl-${openssl_ver}
  15. make clean
  16. ./config -fPIC --prefix=${openssl_install_dir} --openssldir=${openssl_install_dir}
  17. make depend
  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. /bin/cp cacert.pem ${openssl_install_dir}/cacert.pem
  23. rm -rf openssl-${openssl_ver}
  24. else
  25. echo "${CFAILURE}openssl-1.0.2 install failed, Please contact the author! ${CEND}"
  26. kill -9 $$
  27. fi
  28. popd
  29. fi
  30. }