2-apache-php73-mysql.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Author: admin@serverOk.in
  3. # Web: https://www.serverok.in
  4. apt-get -y install apache2
  5. apt-get -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 upgrade -y
  15. apt install -y php7.3
  16. apt install -y php7.3-bcmath php7.3-bz2 php7.3-cgi php7.3-cli php7.3-common php7.3-curl php7.3-dba php7.3-dev php7.3-enchant php7.3-gd php7.3-gmp php7.3-imap php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-pgsql php7.3-pspell php7.3-readline php7.3-soap php7.3-sqlite3 php7.3-sybase php7.3-tidy php7.3-xml php7.3-xmlrpc php7.3-zip php7.3-xsl php7.3-gmp php7.3-mcrypt
  17. apt install -y libapache2-mod-php7.3
  18. a2dismod php7.4
  19. a2enmod php7.3
  20. update-alternatives --config php
  21. systemctl enable apache2
  22. systemctl start apache2
  23. apt-get -y install mariadb-client mariadb-server
  24. systemctl enable mysql
  25. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  26. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  27. apt-get install -y postfix
  28. apt install -y monit
  29. ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/
  30. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  31. systemctl enable monit
  32. systemctl start monit
  33. apt install automysqlbackup -y