2-nginx-php56-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 php5.6-cli php5.6-curl php5.6-gd php5.6-mysql php5.6-imagick php5.6-imap \
  11. php5.6-xml php5.6-mbstring php5.6-zip php5.6-xmlrpc php5.6-soap php5.6-intl php5.6-bcmath \
  12. php5.6-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 php5.6-fpm
  23. systemctl restart php5.6-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