install.sh 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. # CentOS 7 install
  3. #move to script directory so all relative paths work
  4. cd "$(dirname "$0")"
  5. #includes
  6. . ./resources/config.sh
  7. . ./resources/colors.sh
  8. # Update CentOS
  9. verbose "Updating CentOS"
  10. yum -y update && yum -y upgrade
  11. # Add additional repository
  12. yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  13. # Installing basics packages
  14. yum -y install ntp yum-utils net-tools epel-release htop vim openssl
  15. # Disable SELinux
  16. resources/selinux.sh
  17. #FusionPBX
  18. resources/fusionpbx.sh
  19. #Postgres
  20. resources/postgresql.sh
  21. #NGINX web server
  22. resources/sslcert.sh
  23. resources/nginx.sh
  24. #PHP/PHP-FPM
  25. resources/php.sh
  26. #Firewalld
  27. resources/firewalld.sh
  28. #FreeSWITCH
  29. resources/switch.sh
  30. #Fail2ban
  31. resources/fail2ban.sh
  32. #restart services
  33. verbose "Restarting packages for final configuration"
  34. systemctl daemon-reload
  35. systemctl restart freeswitch
  36. systemctl restart php-fpm
  37. systemctl restart nginx
  38. systemctl restart fail2ban
  39. #add the database schema, user and groups
  40. resources/finish.sh