2-nginx-php-73-mysql.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. apt -y install apt-transport-https lsb-release ca-certificates
  3. wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
  4. echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
  5. apt update
  6. apt -y install nginx
  7. apt install -y php7.3-bcmath php7.3-cli php7.3-common php7.3-curl php7.3-gd php7.3-imap php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-readline php7.3-soap php7.3-xml php7.3-xmlrpc php7.3-zip
  8. apt -y install php7.3-fpm
  9. phpenmod -v 7.3 simplexml
  10. apt -y install mariadb-client mariadb-server
  11. apt -y install automysqlbackup
  12. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  13. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  14. apt-get install -y postfix
  15. systemctl enable php7.3-fpm
  16. systemctl enable mariadb
  17. systemctl enable nginx
  18. systemctl restart php7.3-fpm
  19. systemctl restart mariadb
  20. systemctl restart nginx
  21. apt install -y monit
  22. ln -s /etc/monit/conf-available/nginx /etc/monit/conf-enabled/nginx
  23. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/mysql
  24. systemctl restart monit