Snippet #131439

TTL: forever — WordwrapView raw

on 2022/11/07 18:01:22 (UTC) by Anonymous as Bash

  1. #!/bin/bash
  2. # run this as root
  3.  
  4. # Webmin install
  5.  
  6. # check updates
  7. apt update
  8. # upgrade system
  9. apt upgrade -y
  10. # add deb repo
  11. echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list
  12. # add webmin keyring
  13. wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add
  14. # check updates
  15. apt update
  16. # install webmin
  17. apt install webmin -y
  18.  
  19. apt install mariadb-client mariadb-server
  20.  
  21.  
  22. # PHP install
  23.  
  24. # apache install
  25. apt install apache2 -y
  26.  
  27. # Install dependencies
  28. apt install software-properties-common apt-transport-https -y
  29. # Add repo with php7.4
  30. add-apt-repository ppa:ondrej/php -y
  31. # check updates
  32. apt update
  33. # upgrade system
  34. apt upgrade -y
  35. # install php7.4
  36. apt install php7.4-common libapache2-mod-php7.4 php7.4-cli -y
  37. # insatll curl for php
  38. apt install php7.4-curl -y
  39. # install mysql for php
  40. apt install php7.4-mysql -y
  41.  
  42.  
  43. # Apache configure
  44.  
  45. # allow .htaccess
  46. a2enmod rewrite
  47. # enable php
  48. a2enmod php7.4
  49. # restart apapche
  50. service apache2 restart
  51.  
  52. # php.ini setup
  53. sed -i 's/;extension=pdo_mysql/extension=pdo_mysql/g' /etc/php/7.4/apache2/php.ini
  54. sed -i 's/;extension=mysqli/extension=mysqli/g' /etc/php/7.4/apache2/php.ini
  55. sed -i 's/;extension=curl/extension=curl/g' /etc/php/7.4/apache2/php.ini

Recent Snippets