2-apache-php80-mysql.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. a2enmod headers
  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 php8.0
  16. apt install -y php8.0-bcmath php8.0-bz2 php8.0-cgi php8.0-cli php8.0-common php8.0-curl php8.0-dba php8.0-dev php8.0-enchant php8.0-gd php8.0-gmp php8.0-imap php8.0-intl php8.0-mbstring php8.0-mysql php8.0-opcache php8.0-pgsql php8.0-pspell php8.0-readline php8.0-soap php8.0-sqlite3 php8.0-sybase php8.0-tidy php8.0-xml php8.0-xmlrpc php8.0-zip php8.0-xsl php8.0-gmp
  17. apt install -y libapache2-mod-php8.0
  18. a2dismod php7.4
  19. a2enmod php8.0
  20. systemctl restart apache2
  21. apt-get -y install mariadb-client mariadb-server
  22. systemctl enable mysql
  23. apt install automysqlbackup -y
  24. echo "postfix postfix/mailname string `hostname`" | debconf-set-selections
  25. echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
  26. apt-get install -y postfix
  27. service apache2 stop
  28. service apache2 start
  29. apt install -y monit
  30. ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/
  31. ln -s /etc/monit/conf-available/mysql /etc/monit/conf-enabled/
  32. systemctl enable monit
  33. systemctl start monit