2-nginx-php83-mysql.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. # Author: admin@serverOk.in
  3. # Web: https://serverok.in
  4. apt install -y software-properties-common
  5. add-apt-repository ppa:ondrej/php
  6. apt update
  7. apt -y upgrade
  8. apt update
  9. apt -y install nginx
  10. apt -y install php8.3-cli php8.3-curl php8.3-gd php8.3-mysql php8.3-imagick php8.3-imap \
  11. php8.3-xml php8.3-mbstring php8.3-zip php8.3-xmlrpc php8.3-soap php8.3-intl php8.3-bcmath \
  12. php8.3-fpm
  13. apt -y install mariadb-client mariadb-server
  14. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  15. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  16. apt-get install -y postfix
  17. apt install automysqlbackup -y
  18. systemctl enable mysql
  19. systemctl restart mysql
  20. systemctl enable nginx
  21. systemctl restart nginx
  22. systemctl enable php8.3-fpm
  23. systemctl restart php8.3-fpm
  24. apt install -y monit
  25. ln -s /etc/monit/conf-available/nginx /etc/monit/conf-enabled/
  26. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  27. systemctl enable monit
  28. systemctl start monit