Fix bug.
This commit is contained in:
parent
246f5921fd
commit
81f4f2e917
|
@ -22,7 +22,7 @@ if [[ ! -d "/usr/include/openssl" ]] && [[ ! -d "/usr/local/include/openssl" ]]
|
|||
fi
|
||||
if [[ "$openssl_ver" < "1.1.1" ]] || [[ "$force_reinstall_openssl" == "1" ]]; then
|
||||
# Build openssl
|
||||
target_openssl_ver="1.1.1m"
|
||||
target_openssl_ver="1.1.1q"
|
||||
sudo bash -l -c "
|
||||
cd /root &&
|
||||
wget https://www.openssl.org/source/openssl-$target_openssl_ver.tar.gz --no-check-certificate -O openssl-$target_openssl_ver.tar.gz &&
|
||||
|
@ -32,7 +32,7 @@ if [[ "$openssl_ver" < "1.1.1" ]] || [[ "$force_reinstall_openssl" == "1" ]]; th
|
|||
make depend -j$cpu_cores && make install &&
|
||||
rm -f /usr/bin/openssl &&
|
||||
ln -s /opt/openssl/bin/* /usr/bin/. &&
|
||||
echo'/opt/openssl/lib' > /etc/ld.so.conf.d/openssl.conf &&
|
||||
echo '/opt/openssl/lib' > /etc/ld.so.conf.d/openssl.conf &&
|
||||
ldconfig"
|
||||
openssl_ver="$target_openssl_ver"
|
||||
cd "$org_pwd"
|
||||
|
|
|
@ -86,9 +86,10 @@ if [[ $ubuntu_version > '21' ]]; then # ruby must use openssl <= 1.1.1. Not supp
|
|||
make depend -j$cpu_cores && make install"
|
||||
openssl_ver="$target_openssl_ver"
|
||||
cd "$org_pwd"
|
||||
openssl_dir="/opt/openssl"
|
||||
openssl_source_dir="/root/openssl-$target_openssl_ver"
|
||||
fi
|
||||
openssl_dir="/opt/openssl"
|
||||
sudo rm -rf /opt/openssl/ssl/certs
|
||||
sudo ln -s /etc/ssl/certs/ /opt/openssl/ssl/.
|
||||
sudo mkdir -p /etc/apt/trusted.gpg.d/
|
||||
fi
|
||||
cd /etc/nginx/
|
||||
|
@ -130,10 +131,10 @@ else
|
|||
# install mongod 6.0
|
||||
apt_add_key_func https://www.mongodb.org/static/pgp/server-6.0.asc
|
||||
if [[ $ubuntu_version > '20' ]]; then
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0-dev_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo dpkg -i libssl1.0-dev_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
sudo dpkg -i libssl-dev_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
|
||||
elif [[ $ubuntu_version =~ '18' ]] || [[ $ubuntu_version =~ '19' ]]; then
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
|
||||
|
@ -166,10 +167,10 @@ else
|
|||
apt_add_key_func https://www.mongodb.org/static/pgp/server-5.0.asc
|
||||
# install mongod 5.0
|
||||
if [[ $ubuntu_version > '20' ]]; then
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0-dev_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo dpkg -i libssl1.0-dev_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
sudo wget -nc http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
sudo dpkg -i libssl-dev_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
|
||||
elif [[ $ubuntu_version =~ '18' ]] || [[ $ubuntu_version =~ '19' ]]; then
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
|
||||
|
|
Loading…
Reference in New Issue