From 88134c95403b81a97711f41aafd83d20e3fbc7ba Mon Sep 17 00:00:00 2001 From: wulabing <91d$5gKrmVShheJf> Date: Thu, 4 Jun 2020 14:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index a005dc0..f57bc89 100644 --- a/install.sh +++ b/install.sh @@ -63,6 +63,8 @@ random_num=$((RANDOM%12+4)) #生成伪装路径 camouflage="/$(head -n 10 /dev/urandom | md5sum | head -c ${random_num})/" +THREAD=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l) + source '/etc/os-release' #从VERSION中提取发行版系统的英文名称,为了在debian/ubuntu下添加相对应的Nginx apt源 @@ -368,7 +370,7 @@ nginx_install() { cd jemalloc-${jemalloc_version} || exit ./configure judge "编译检查" - make && make install + make -j "${THREAD}" && make install judge "jemalloc 编译安装" echo '/usr/local/lib' >/etc/ld.so.conf.d/local.conf ldconfig @@ -392,7 +394,7 @@ nginx_install() { --with-ld-opt="-ljemalloc" \ --with-openssl=../openssl-"$openssl_version" judge "编译检查" - make && make install + make -j "${THREAD}" && make install judge "Nginx 编译安装" # 修改基本配置