2-nginx-php71-mysql.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. # Author: admin@serverOk.in
  3. # Web: https://www.serverok.in
  4. apt install -y software-properties-common
  5. add-apt-repository ppa:ondrej/php
  6. apt -y upgrade
  7. apt update
  8. apt -y install nginx
  9. apt -y install php7.1-cli php7.1-curl php7.1-gd php7.1-mysql php7.1-imagick php7.1-imap php7.1-json
  10. apt -y install php7.1-xml php7.1-mbstring php7.1-zip php7.1-xmlrpc php7.1-soap php7.1-intl php7.1-bcmath php7.1-gmp
  11. apt install -y php7.1-fpm
  12. apt -y install mariadb-client mariadb-server
  13. apt install automysqlbackup -y
  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. systemctl enable mysql
  18. systemctl enable nginx
  19. systemctl restart mysql
  20. systemctl restart nginx
  21. systemctl enable php7.1-fpm
  22. systemctl restart php7.1-fpm
  23. apt install -y monit
  24. ln -s /etc/monit/conf-available/nginx /etc/monit/conf-enabled/
  25. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  26. systemctl enable monit
  27. systemctl start monit