2-apache-php56-mysql.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. # Author: admin@serverok.in
  3. # Web: https://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. sed -i 's/#Mutex file:..APACHE_LOCK_DIR. default/Mutex posixsem/g' /etc/apache2/apache2.conf
  10. add-apt-repository ppa:ondrej/php
  11. apt -y upgrade
  12. apt -y install php5.6-bcmath php5.6-bz2 php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dba php5.6-dev php5.6-enchant php5.6-gd php5.6-gmp php5.6-imap php5.6-intl php5.6-json php5.6-mbstring php5.6-mysql php5.6-opcache php5.6-pgsql php5.6-pspell php5.6-readline php5.6-soap php5.6-sqlite3 php5.6-sybase php5.6-tidy php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-xsl php5.6-mcrypt
  13. apt -y install libapache2-mod-php5.6
  14. a2dismod php7.4
  15. a2enmod php5.6
  16. apt-get -y install mariadb-client mariadb-server
  17. systemctl enable mysql
  18. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  19. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  20. apt-get install -y postfix
  21. service apache2 stop
  22. service apache2 start
  23. apt install -y monit
  24. ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/
  25. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  26. apt install automysqlbackup -y
  27. systemctl enable monit
  28. systemctl start monit