From 2bfa7cafee60b32e57e16752e5bf488cddfe5ced Mon Sep 17 00:00:00 2001 From: Jinnan Wang Date: Tue, 18 Mar 2014 09:16:55 +0800 Subject: [PATCH] =?UTF-8?q?=09=E5=90=88=E5=B9=B6limits.conf=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9B=B8=E5=85=B3=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除set_kernel.sh文件,并将其内容并入set_limits.conf.sh 移除set_kernel.sh的调用 --- install_shell/set_kernel.sh | 18 ------------------ install_shell/set_limits.conf.sh | 17 +++++++++++++++++ setup.sh | 3 --- 3 files changed, 17 insertions(+), 21 deletions(-) delete mode 100755 install_shell/set_kernel.sh diff --git a/install_shell/set_kernel.sh b/install_shell/set_kernel.sh deleted file mode 100755 index 3fc56d8..0000000 --- a/install_shell/set_kernel.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# Parallel computing patch - -. ./check_function.sh - -LIMIT_CONFIG=/etc/security/limits.conf - - -# set limits.conf -grep -v ^# $LIMIT_CONFIG | grep stack | grep 16384 | grep hard &>/dev/null -if [ $? -eq 1 ];then - echo "* soft stack 8192" >> $LIMIT_CONFIG - echo "* hard stack 8192" >> $LIMIT_CONFIG -elif [ $? -eq 0 ];then - exit 0 -fi - - diff --git a/install_shell/set_limits.conf.sh b/install_shell/set_limits.conf.sh index 52f0aba..aa5e55b 100755 --- a/install_shell/set_limits.conf.sh +++ b/install_shell/set_limits.conf.sh @@ -1,5 +1,22 @@ #!/bin/bash + +. ./check_function.sh + +LIMIT_CONFIG=/etc/security/limits.conf + + +# set limits.conf +grep -v ^# $LIMIT_CONFIG | grep stack | grep 16384 | grep hard &>/dev/null +if [ $? -eq 1 ];then + echo "* soft stack 8192" >> $LIMIT_CONFIG + echo "* hard stack 8192" >> $LIMIT_CONFIG +elif [ $? -eq 0 ];then + exit 0 +fi + + + #本脚本更改同时打开文件数的限制为65536 ROOT_UID=0 diff --git a/setup.sh b/setup.sh index bf7718f..8daaaec 100755 --- a/setup.sh +++ b/setup.sh @@ -19,9 +19,6 @@ fi ./set_network.sh echo "====Set Bonding..." -./set_kernel.sh -echo "====Set Kernel parameters..." - ./set_ssh.sh $1 $2 $3 echo "====Set ssh...."