Script d'installation d'un serveur Ubuntu 20.04 à distance
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 regels
445 B

  1. #!/bin/bash
  2. sudo apt update
  3. sudo apt upgrade -y
  4. sudo apt install -y apache2 php
  5. sudo chown -R ubuntu:ubuntu /var/www/html
  6. rm /var/www/html/index.html
  7. echo "<!DOCTYPE html>
  8. <html lang='fr'>
  9. <head>
  10. <meta charset='UTF-8'>
  11. <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  12. <title>PHP Info</title>
  13. </head>
  14. <body>
  15. <?php phpinfo(); ?>
  16. </body>
  17. </html>
  18. " > /var/www/html/index.php
  19. # Ou bien cp index.php /var/www/html