item2.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. #Item2 LAMP
  3. echo "start install LAMP"
  4. sudo apt-get install tasksel -y
  5. sudo DEBIAN_FRONTEND=noninteractive tasksel install lamp-server
  6. echo "install phpmyadmin"
  7. cd /tmp/;pwd;sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-all-languages.tar.gz -q;tar -zxvf phpMyAdmin-5.1.0-all-languages.tar.gz;sudo rm phpMyAdmin-5.1.0-all-languages.tar.gz;sudo mv phpMyAdmin-5.1.0-all-languages /var/www/html/phpmyadmin
  8. cd /var/www/html/phpmyadmin;pwd;mkdir tmp;
  9. cd;pwd;
  10. echo "install phpmyadmin done"
  11. sudo apt-get install openssl -y
  12. sudo apt-get install php-common -y
  13. sudo apt-get install php-curl -y
  14. sudo apt-get install php-json -y
  15. sudo apt-get install php-mbstring -y
  16. sudo apt-get install php-mysql -y
  17. sudo apt-get install php-xml -y
  18. sudo apt-get install php-zip -y
  19. #php version
  20. sudo apt-get install php7.2-mbstring -y
  21. sudo apt-get install php7.2-xml -y
  22. sudo apt-get install php7.2-mysql -y
  23. sudo apt-get install php7.2-common -y
  24. sudo apt-get install php7.2-curl -y
  25. sudo apt-get install php7.2-json -y
  26. sudo apt-get install php7.2-zip -y
  27. echo "open apache2 "
  28. sudo service apache2 start
  29. echo "setting mysql pass"
  30. sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Gold@53743001';"
  31. echo "setting mysql done"