Advertisement
MorpheusArch

LAMP Install Fedora 23

Mar 22nd, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.95 KB | None | 0 0
  1. #This program is free software: you can redistribute it and/or modify
  2. #it under the terms of the GNU General Public License as published by
  3. #the Free Software Foundation, either version 3 of the License, or
  4. #(at your option) any later version.
  5.  
  6. #This program is distributed in the hope that it will be useful,
  7. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9. #GNU General Public License for more details.
  10.  
  11. #You should have received a copy of the GNU General Public License
  12. #along with this program.  If not, see <http://www.gnu.org/licenses/>.
  13.  
  14. ###############################################################
  15.  
  16. echo "Performing a system update...please wait"
  17. sleep 1
  18. dnf update
  19.  
  20. ###############################################################
  21.  
  22. echo "Installing httpd"
  23. sleep 1
  24. dnf install httpd
  25. systemctl start httpd.service
  26. sleep 1
  27. systemctl status httpd.service
  28. sleep 1
  29.  
  30. ###############################################################
  31.  
  32. echo "Installing mariadb-server"
  33. dnf install mariadb-server
  34. sleep 1
  35. echo "Starting mariadb"
  36. systemctl start mariadb
  37. sleep 1
  38. systemctl status mariadb
  39. sleep 1
  40. echo "Adding mariadb to boot services"
  41. systemctl enable mariadb
  42. sleep 1
  43. mysql_secure_installation
  44.  
  45. ##################################################################
  46.  
  47. echo "Installing PHP"
  48. dnf install php php-mysql
  49. sleep 1
  50. echo "Restarting apache for system changes to take effect"
  51. systemctl restart httpd.service
  52. sleep 1
  53. systemctl status httpd
  54. sleep 1
  55.  
  56. ###################################################################
  57.  
  58. sleep 1
  59. echo "Allowing http & https traffic to server through firewall"
  60. sleep 1
  61.     firewall-cmd  --set-default-zone=public && firewall-cmd --permanent --zone=public --add-service=http && firewall-cmd --permanent --zone=public --add-service=https && firewall-cmd --reload
  62. ####################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement