install.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. # removes the cd img from the /etc/apt/sources.list file (not needed after base install)
  9. sed -i '/cdrom:/d' /etc/apt/sources.list
  10. #Update to latest packages
  11. verbose "Update installed packages"
  12. apt-get update && apt-get upgrade -y
  13. #Add dependencies
  14. apt-get install -y wget
  15. apt-get install -y lsb-release
  16. apt-get install -y systemd
  17. apt-get install -y systemd-sysv
  18. apt-get install -y ca-certificates
  19. apt-get install -y dialog
  20. apt-get install -y nano
  21. apt-get install -y net-tools
  22. apt-get install -y gpg
  23. #SNMP
  24. apt-get install -y snmpd
  25. echo "rocommunity public" > /etc/snmp/snmpd.conf
  26. service snmpd restart
  27. #disable vi visual mode
  28. echo "set mouse-=a" >> ~/.vimrc
  29. #IPTables
  30. resources/iptables.sh
  31. #sngrep
  32. resources/sngrep.sh
  33. #PHP
  34. resources/php.sh
  35. #NGINX web server
  36. resources/nginx.sh
  37. #FusionPBX
  38. resources/fusionpbx.sh
  39. #Optional Applications
  40. resources/applications.sh
  41. #FreeSWITCH
  42. resources/switch.sh
  43. #Fail2ban
  44. resources/fail2ban.sh
  45. #Postgres
  46. resources/postgresql.sh
  47. #set the ip address
  48. server_address=$(hostname -I)
  49. #add the database schema, user and groups
  50. resources/finish.sh