install.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. #move to script directory so all relative paths work
  3. cd "$(dirname "$0")"
  4. #includes
  5. . ./resources/config.sh
  6. . ./resources/colors.sh
  7. . ./resources/environment.sh
  8. #Update to latest packages
  9. verbose "Update installed packages"
  10. #apt-get upgrade && apt-get update -y --force-yes
  11. # --force-yes is dangerous as per the man page. Lets use -y
  12. apt-get -q update && apt-get -q --assume-yes upgrade
  13. #Add dependencies
  14. apt-get install -y wget
  15. apt-get install -y lsb-release
  16. apt-get install -y ca-certificates
  17. apt-get install -y dialog
  18. apt-get install -y nano
  19. apt-get install -y net-tools
  20. #SNMP
  21. apt-get install -y snmpd
  22. echo "rocommunity public" > /etc/snmp/snmpd.conf
  23. service snmpd restart
  24. #IPTables
  25. resources/iptables.sh
  26. #Optional CLI SIP monitoring tool
  27. resources/sngrep.sh
  28. #FusionPBX
  29. resources/fusionpbx.sh
  30. #PHP
  31. resources/php.sh
  32. #NGINX web server
  33. resources/nginx.sh
  34. #Postgres
  35. resources/postgresql.sh
  36. #FreeSWITCH
  37. resources/switch.sh
  38. #Fail2ban
  39. resources/fail2ban.sh
  40. #set the ip address
  41. server_address=$(hostname -I)
  42. #add the database schema, user and groups
  43. resources/finish.sh