2-apache-php-mysql.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. update-rc.d apache2 enable
  7. a2enmod rewrite
  8. a2enmod ssl
  9. sed -i 's/#Mutex file:..APACHE_LOCK_DIR. default/Mutex posixsem/g' /etc/apache2/apache2.conf
  10. apt-get -y install php php-cli php-curl php-gd \
  11. php-mysql php-imagick php-imap \
  12. php-json php-xml php-mbstring php-zip \
  13. php-xmlrpc php-soap php-intl php-bcmath
  14. # Debian 8
  15. # apt-get -y install php5 php5-cli php5-curl php5-gd php5-mysql php5-imagick php5-imap php5-mcrypt php5-json php5-xmlrpc php5-intl
  16. #apt -y install php7.0-pgsql
  17. apt-get -y install libapache2-mod-php
  18. apt-get -y install mariadb-client mariadb-server
  19. update-rc.d mysql enable
  20. apt install automysqlbackup -y
  21. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  22. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  23. apt install -y postfix
  24. echo '$cfg["blowfish_secret"] = "ohhae8Fa6oJohrohng0ieV0to3aiThae";' >> /etc/phpmyadmin/config.inc.php
  25. service apache2 stop
  26. service apache2 start
  27. apt install -y monit
  28. ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/
  29. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  30. systemctl enable monit
  31. systemctl start monit