You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
583 B

  1. #!/bin/bash
  2. # Colors
  3. CSI="\033["
  4. CEND="${CSI}0m"
  5. CRED="${CSI}1;31m"
  6. CGREEN="${CSI}1;32m"
  7. # Check root access
  8. if [[ "$EUID" -ne 0 ]]; then
  9. echo -e "${CRED}Sorry, you need to run this as root${CEND}"
  10. exit 1
  11. fi
  12. echo 'deb http://packages.dotdeb.org jessie all' > /etc/apt/sources.list.d/dotdeb.list
  13. wget https://www.dotdeb.org/dotdeb.gpg
  14. apt-key add dotdeb.gpg &>/dev/null
  15. apt-get update && apt-get upgrade -y &>/dev/null
  16. apt-get install redis-server -y &>/dev/null
  17. service redis-server start
  18. # We're done !
  19. echo ""
  20. echo -e " ${CGREEN}installation successful !${CEND}"
  21. echo ""