wahyuief

Web Server

Jul 6th, 2020
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.94 KB | None | 0 0
  1. apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
  2. fallocate -l 1G /swapfile
  3. chmod 600 /swapfile
  4. mkswap /swapfile
  5. swapon /swapfile
  6. cp /etc/fstab /etc/fstab.bak
  7. echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
  8. sysctl vm.swappiness=10
  9. sysctl vm.vfs_cache_pressure=50
  10. echo "vm.swappiness=10" >> /etc/sysctl.conf
  11. echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
  12. add-apt-repository ppa:ondrej/nginx
  13. add-apt-repository ppa:ondrej/php
  14. apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
  15. add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu focal main'
  16. apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
  17. apt autoremove
  18. # apt-get install php7.4-common php7.4-fpm php7.4-cli php7.4-curl php7.4-json php7.4-zip php7.4-xml php7.4-xmlrpc php7.4-memcached
  19. # apt-get install php7.4-opcache php7.4-mbstring php7.4-bcmath php7.4-mysql php7.4-igbinary php7.4-imagick php7.4-redis php7.4-gd
  20. # apt-get install redis brotli certbot python3-certbot-nginx mariadb-server nginx
  21. # ufw allow 'Nginx Full'
  22. # ufw allow 'OpenSSH'
  23. # ufw enable
Add Comment
Please, Sign In to add comment