cat > /etc/security/limits.conf<< EOF
* soft nproc 16384
* hard nproc 16384
* soft nofile 1048576
* hard nofile 1048576
* soft stack 10240
* hard stack 32768
* hard memlock 8000000
* soft memlock 8000000
EOF
echo -ne "
* soft nofile 65536
* hard nofile 65536
" >>/etc/security/limits.conf
cat /dev/null > /etc/security/limits.conf