-
-
Save nteej/96817de174f03fdcfefe2d3201c5b61a to your computer and use it in GitHub Desktop.
Revisions
-
hasanbayatme revised this gist
Jul 8, 2017 . No changes.There are no files selected for viewing
-
hasanbayatme revised this gist
Jul 8, 2017 . No changes.There are no files selected for viewing
-
hasanbayatme revised this gist
Jul 8, 2017 . No changes.There are no files selected for viewing
-
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,15 @@ ## Installation ### Automatic Run the below command in terminal: ```bash wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bash ``` [:arrow_right: Go to next steps](#next-steps) ### Manual First off, run the below command to update package index: @@ -78,6 +80,8 @@ sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.php xdg-open "http://localhost/info.php" ``` [:arrow_right: Go to next steps](#next-steps) ## Next Steps ### Install phpMyAdmin -
hasanbayatme revised this gist
Jul 8, 2017 . 2 changed files with 79 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,22 @@ ## Installation ### Installation Run the below command in terminal: ```bash wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bash ``` ### Manual First off, run the below command to update package index: ```bash sudo apt update ``` Then run these commands in terminal separately to install each component: > Apache @@ -26,19 +36,78 @@ sudo apt install mysql-server sudo apt install php php-mysql libapache2-mod-php php-cli ``` > Adjust Firewall ```bash sudo ufw allow in "Apache Full" ``` > Adjust permissions ```bash sudo chmod -R 0755 /var/www/html/ ``` > Allow running Apache on boot up ```bash sudo systemctl enable apache2 ``` > Start Apache server ```bash sudo systemctl start apache2 ``` > Test Apache ```bash xdg-open "http://localhost" ``` > Create sample PHP script file ```bash sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.php ``` > Run sample PHP script file ```bash xdg-open "http://localhost/info.php" ``` ## Next Steps ### Install phpMyAdmin Run the below command in terminal to install phpMyAdmin and it's prerequisites: ```bash sudo apt install phpmyadmin php-mbstring php-gettext ``` And then enable required extensions: ```bash sudo phpenmod mcrypt sudo phpenmod mbstring ``` Then restart Apache server: ```bash sudo systemctl restart apache2 ``` Now navigate to the phpMyAdmin: ```bash xdg-open "http://localhost" ``` --- All done. now you have Apache2, MySQL, PHP installed. Made with :heart: by [Bayat](https://github.com/EmpireWorld) 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 charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,11 @@ sudo apt update # Install Apache2, MySQL, PHP sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php php-cli # 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" @@ -19,5 +22,5 @@ sudo chmod -R 0755 /var/www/html/ 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" -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bash ``` or run these commands separately to install each component: -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget --no-cache -O - https://cdn.rawgit.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/275a9023dfb7ee7b915e75a57ca760134f563c04/install-lamp.sh | bash ``` or run these commands separately to install each component: -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 2 additions and 17 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,5 @@ #!/bin/bash # Update Package Index sudo apt update @@ -34,5 +19,5 @@ sudo chmod -R 0755 /var/www/html/ sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.php # Open localhost in the default browser x-www-browser http://localhost x-www-browser http://localhost/info.php -
hasanbayatme revised this gist
Jul 8, 2017 . 2 changed files with 9 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget --no-cache -O - https://cdn.rawgit.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/275a9023dfb7ee7b915e75a57ca760134f563c04/install-lamp.md | bash ``` or run these commands separately to install each component: 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 charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,17 @@ # Open Browser Function function openbrowser { if which x-www-browser [[ -x $BROWSER ]] && exec "$BROWSER" "$1 $2" path=$(which x-www-browser || which xdg-open || which gnome-open) && exec "$path" "$1 $2" echo "Can't find browser" if hash x-www-browser 2>/dev/null; then x-www-browser $1 else if hash xdg-open 2>/dev/null; then xdg-open "$1" else if hash gnome-open 2>/dev/null; then gnome-open "$1" fi } # Update Package Index -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/b4dc7224f388e9afcea91e44103dbb8f9fd66bf8/install-lamp.sh | bash ``` or run these commands separately to install each component: -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,8 @@ # Open Browser Function function openbrowser { [[ -x $BROWSER ]] && exec "$BROWSER" "$1 $2" path=$(which x-www-browser || which xdg-open || which gnome-open) && exec "$path" "$1 $2" echo "Can't find browser" } -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget --no-cache -O - https://gist.githubusercontent.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/be6eecf35b9e24c0d2fb28912bdf2c9c053799d2/install-lamp.sh | bash ``` or run these commands separately to install each component: -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/69bf5c5d5a841ed0d1256f9845cabdea0fa623f1/install-lamp.sh | bash ``` or run these commands separately to install each component: -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash # Open Browser Function function openbrowser { [[ -x $BROWSER ]] && exec "$BROWSER" "$1" path=$(which x-www-browser || which xdg-open || which gnome-open) && exec "$path" "$1" echo "Can't find browser" -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 8 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,12 @@ #!/bin/bash # Open Browser Function function openbrowser () { [[ -x $BROWSER ]] && exec "$BROWSER" "$1" path=$(which x-www-browser || which xdg-open || which gnome-open) && exec "$path" "$1" echo "Can't find browser" } # Update Package Index sudo apt update @@ -20,10 +27,4 @@ sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.php # Open localhost in the default browser openbrowser http://localhost openbrowser http://localhost/info.php -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ #!/bin/bash # Update Package Index sudo apt update -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ # Update Package Index sudo apt update # Install Apache2, MySQL, PHP sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php php-cli -
hasanbayatme revised this gist
Jul 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run the below command in terminal: ```bash wget -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/69bf5c5d5a841ed0d1256f9845cabdea0fa623f1/install-lamp.sh | bash ``` or run these commands separately to install each component: -
hasanbayatme created this gist
Jul 8, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ ## Installation Run the below command in terminal: ```bash wget install-lamp.sh | bash ``` or run these commands separately to install each component: > Apache ```bash sudo apt install apache2 ``` > MySQL ```bash sudo apt install mysql-server ``` > PHP ```bash sudo apt install php php-mysql libapache2-mod-php php-cli ``` And then adjust the firewall: ```bash sudo ufw allow in "Apache Full" ``` Now try the php processing: ```bash sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.php sudo xdg-open http://localhost/info.php ``` All done. now you have Apache2, MySQL, PHP installed. Made with :heart: by [Bayat](https://github.com/EmpireWorld) 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # Install Apache2, MySQL, PHP sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php php-cli # Restart Apache Web Server sudo systemctl restart 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 openbrowser http://localhost openbrowser http://localhost/info.php openbrowser () { [[ -x $BROWSER ]] && exec "$BROWSER" "$1" path=$(which x-www-browser || which xdg-open || which gnome-open) && exec "$path" "$1" echo "Can't find browser" }