diff --git a/install.sh b/install.sh index 78071c9..755ecd7 100644 --- a/install.sh +++ b/install.sh @@ -170,8 +170,15 @@ dependency_install(){ ${INS} -y haveged judge "haveged 安装" - judge "nginx 编译依赖安装" + if [[ "${ID}" == "centos" ]];then + systemctl start rngd && systemctl enable rngd + systemctl start haveged && systemctl enable haveged + else + systemctl start rng-tools && systemctl enable rng-tools + systemctl start haveged && systemctl enable haveged + fi + judge "nginx 编译依赖安装" } basic_optimization(){ # 最大文件打开数 diff --git a/install_h2.sh b/install_h2.sh index 13d864b..d599e0e 100644 --- a/install_h2.sh +++ b/install_h2.sh @@ -178,6 +178,13 @@ dependency_install(){ ${INS} -y haveged judge "haveged 安装" + if [[ "${ID}" == "centos" ]];then + systemctl start rngd && systemctl enable rngd + systemctl start haveged && systemctl enable haveged + else + systemctl start rng-tools && systemctl enable rng-tools + systemctl start haveged && systemctl enable haveged + fi } port_alterid_set(){