Skip to content

Commit 6fc3a45

Browse files
Merge pull request hestiacp#1249 from chipitsine/centos7_nolimit
CentOS 7: increase number of open files
2 parents 09c884f + 6cd03c1 commit 6fc3a45

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

install/vst-install-rhel.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,11 @@ if [ "$nginx" = 'yes' ]; then
852852
wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
853853
echo > /etc/nginx/conf.d/vesta.conf
854854
mkdir -p /var/log/nginx/domains
855+
if [ "$release" -eq 7 ]; then
856+
mkdir /etc/systemd/system/nginx.service.d/
857+
echo "[Service]" > /etc/systemd/system/nginx.service.d/limits.conf
858+
echo "LimitNOFILE=500000" >> /etc/systemd/system/nginx.service.d/limits.conf
859+
fi
855860
chkconfig nginx on
856861
service nginx start
857862
check_result $? "nginx start failed"
@@ -890,6 +895,11 @@ if [ "$apache" = 'yes' ]; then
890895
chmod a+x /var/log/httpd
891896
mkdir -p /var/log/httpd/domains
892897
chmod 751 /var/log/httpd/domains
898+
if [ "$release" -eq 7 ]; then
899+
mkdir /etc/systemd/system/httpd.service.d/
900+
echo "[Service]" > /etc/systemd/system/httpd.service.d/limits.conf
901+
echo "LimitNOFILE=500000" >> /etc/systemd/system/httpd.service.d/limits.conf
902+
fi
893903
chkconfig httpd on
894904
service httpd start
895905
check_result $? "httpd start failed"

0 commit comments

Comments
 (0)