Last active
February 14, 2022 13:56
-
-
Save ahaneef29/efcabd7d3d006d68fd4c903a364b0585 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update Package Index | |
sudo apt update | |
# Install Apache2, MySQL, PHP | |
sudo apt-get install -y php7.4 php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath | |
# Allow to run Apache on boot up | |
sudo systemctl enable apache2 | |
# Restart Apache Web Server | |
sudo systemctl start apache2 | |
# Adjust Firewall | |
sudo ufw allow in "Apache Full" | |
# Allow Read/Write for Owner | |
sudo chmod -R 0755 /var/www/html/ | |
# Create info.php for testing php processing | |
sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.php | |
# Open localhost in the default browser | |
xdg-open "http://localhost" | |
xdg-open "http://localhost/info.php" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment