2-apache-php71-mysql.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. # Author: admin@serverOk.in
  3. # Web: https://www.serverok.in
  4. apt-get -y install apache2
  5. apt -y install libapache2-mod-ruid2
  6. systemctl enable apache2
  7. a2enmod rewrite
  8. a2enmod ssl
  9. systemctl restart apache2
  10. sed -i 's/#Mutex file:..APACHE_LOCK_DIR. default/Mutex posixsem/g' /etc/apache2/apache2.conf
  11. apt-get install software-properties-common
  12. add-apt-repository ppa:ondrej/php
  13. apt update
  14. apt -y upgrade
  15. apt install php7.1
  16. apt install php7.1-bcmath php7.1-bz2 php7.1-cgi php7.1-cli php7.1-common php7.1-curl php7.1-dba php7.1-dev php7.1-enchant php7.1-gd php7.1-gmp php7.1-imap php7.1-intl php7.1-json php7.1-mbstring php7.1-mysql php7.1-opcache php7.1-pgsql php7.1-pspell php7.1-readline php7.1-soap php7.1-sqlite3 php7.1-sybase php7.1-tidy php7.1-xml php7.1-xmlrpc php7.1-zip php7.1-xsl php7.1-gmp
  17. apt install libapache2-mod-php7.1
  18. a2enmod php7.1
  19. systemctl enable apache2
  20. systemctl start apache2
  21. apt-get -y install mysql-server-5.7
  22. systemctl enable mysql
  23. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  24. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  25. apt-get install -y postfix
  26. apt install -y monit
  27. ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/
  28. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  29. systemctl enable monit
  30. systemctl start monit
  31. apt install automysqlbackup -y