1337ings

[Shell] Auto Ulimit Updater

Nov 5th, 2017
789
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #!/bin/sh
  2. #-------------------------------------------------
  3. # Ulimit & iptable auto-updater, saves alot of time.
  4. # Developed for CentOS 6/7
  5. #------------------------
  6. # wget http://pastebin.com/raw.php?i=hf3Gc3VP -O updater.sh
  7. # chmod 777 updater.sh
  8. # sh updater.sh
  9. #--------------
  10. echo "Updating iptables & ulimit"
  11. read -p "Press enter to continue.."
  12. yum install gcc -y; service iptables stop; chkconfig iptables off; ulimit -Hn 999999; ulimit -Sn 99999; echo -e 'ulimit -s 999999; ulimit -n 999999; ulimit -u 999999\n' >> ~/.bashrc; ulimit -s 999999; ulimit -n 999999; ulimit -u 999999; sysctl -w fs.file-max=999999 >/dev/null; wget -q https://pastebin.com/raw.php?i=DEuu6MzK -O /etc/security/limits.conf; wget -q https://pastebin.com/raw.php?i=1UB3u1fn -O /usr/include/bits/typesizes.h
  13. echo "Ulimit & iptables are fully updated"
  14. echo "Thank you for using my updater"
  15. echo "https://pastebin.com/hf3Gc3VP"
  16. echo "Chris Poole | codingplanets"
Add Comment
Please, Sign In to add comment