Fix bug.
This commit is contained in:
parent
9450fb2137
commit
d569b26ec0
|
@ -3,7 +3,7 @@ function escape_str(){
|
|||
echo $1|sed -E 's/\\+//g' |sed -E 's/[\/\.\*]/\\\0/g'
|
||||
}
|
||||
ubuntu_ver="$(lsb_release -rs)"
|
||||
sudo apt install -y make
|
||||
sudo apt-get install -y linux-kernel-headers build-essential
|
||||
org_pwd="$(pwd)"
|
||||
cpu_cores="$(nproc --all)"
|
||||
if [[ -z "$cpu_cores" ]]; then
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
ubuntu_version=$(lsb_release -rs)
|
||||
sudo apt update
|
||||
sudo apt install -y git
|
||||
sudo apt install -y make
|
||||
sudo apt install -y linux-kernel-headers build-essential
|
||||
org_pwd=$(pwd)
|
||||
if [[ $ubuntu_version =~ '14' ]]; then
|
||||
sudo apt install libgmp-dev -y
|
||||
|
@ -41,7 +41,8 @@ else
|
|||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mongodb-org=6.0.1 mongodb-org-database=6.0.1 mongodb-org-server=6.0.1 mongodb-mongosh=6.0.1 mongodb-org-mongos=6.0.1 mongodb-org-tools=6.0.1 mongodb-clients
|
||||
sudo apt-get install -y mongodb-org=6.0.1 mongodb-org-database=6.0.1 mongodb-org-server=6.0.1 mongodb-mongosh mongodb-org-mongos=6.0.1 mongodb-org-tools=6.0.1
|
||||
sudo apt-get install -y mongodb-clients
|
||||
sudo service mongod stop
|
||||
sudo rm -f /var/lib/mongodb/mongod.lock
|
||||
sudo rm -f /tmp/mongodb-27017.sock
|
||||
|
@ -49,6 +50,9 @@ sudo chown mongodb:mongodb /var/lib/mongodb -R
|
|||
sudo chown mongodb:mongodb /var/log/mongodb -R
|
||||
sudo service mongod restart
|
||||
sleep 10
|
||||
if [[ ! -e /usr/bin/mongo ]]; then
|
||||
sudo ln -s /usr/bin/mongosh /usr/bin/mongo
|
||||
fi
|
||||
if [ -e /tmp/mongodb-27017.sock ]; then
|
||||
echo "Mongo start success!"
|
||||
else
|
||||
|
@ -73,13 +77,16 @@ else
|
|||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mongodb-org=5.0.11 mongodb-org-database=5.0.11 mongodb-org-server=5.0.11 mongodb-org-shell=5.0.11 mongodb-org-mongos=5.0.11 mongodb-org-tools=5.0.11 mongodb-clients
|
||||
sudo apt-get install -y mongodb-org=5.0.11 mongodb-org-database=5.0.11 mongodb-org-server=5.0.11 mongodb-org-shell=5.0.11 mongodb-org-mongos=5.0.11 mongodb-org-tools=5.0.11 mongodb-mongosh
|
||||
sudo rm -f /var/lib/mongodb/mongod.lock
|
||||
sudo rm -f /tmp/mongodb-27017.sock
|
||||
sudo chown mongodb:mongodb /var/lib/mongodb -R
|
||||
sudo chown mongodb:mongodb /var/log/mongodb -R
|
||||
sudo service mongod restart
|
||||
sleep 10
|
||||
if [[ ! -e /usr/bin/mongo ]]; then
|
||||
sudo ln -s /usr/bin/mongosh /usr/bin/mongo
|
||||
fi
|
||||
if [ -e /tmp/mongodb-27017.sock ]; then
|
||||
echo "Mongo start success!"
|
||||
else
|
||||
|
@ -99,7 +106,7 @@ else
|
|||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mongodb-org=4.4.11 mongodb-org-server=4.4.11 mongodb-org-shell=4.4.11 mongodb-org-mongos=4.4.11 mongodb-org-tools=4.4.11 mongodb-clients
|
||||
sudo apt-get install -y mongodb-org=4.4.11 mongodb-org-server=4.4.11 mongodb-org-shell=4.4.11 mongodb-org-mongos=4.4.11 mongodb-org-tools=4.4.11
|
||||
sudo service mongod restart
|
||||
sleep 10
|
||||
if [ -e /tmp/mongodb-27017.sock ]; then
|
||||
|
@ -138,7 +145,7 @@ if [ -z $(which convert) ]; then
|
|||
apt install -y cmake pkg-config libbrotli-dev && \
|
||||
wget -nc https://imagemagick.org/archive/ImageMagick.tar.gz && \
|
||||
tar xfz ImageMagick.tar.gz && \
|
||||
cd $(sudo bash -l -c 'ls -d /root/libpng-1.5.13/ImageMagick-7*') && \
|
||||
cd `ls -d /root/libpng-1.5.13/ImageMagick-7*` && \
|
||||
./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared --with-modules && \
|
||||
make && make install && \
|
||||
ln -s /usr/local/lib/* /usr/lib/. && \
|
||||
|
|
Loading…
Reference in New Issue