prerequisites.sh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/bash
  2. set -x
  3. export DEBIAN_FRONTEND=noninteractive
  4. RETCODE=$(fw_exists fwbm_prereqs_installed)
  5. [ ! "$RETCODE" == 0 ] || { \
  6. echo "Prerequisites installed!";
  7. return 0;
  8. }
  9. # Use a more recent version of Mongo shell
  10. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
  11. echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
  12. sudo apt-get -y update
  13. sudo apt-get -y upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
  14. # WARNING: DONT PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
  15. sudo apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
  16. cmake build-essential automake `# Needed for building code` \
  17. curl wget unzip `# Common tools` \
  18. software-properties-common `# Needed for add-apt-repository` \
  19. git-core mercurial `# Version control systems` \
  20. libpcre3 libpcre3-dev libpcrecpp0 `# Regular expression support` \
  21. libssl-dev libcurl4-openssl-dev `# SSL libraries` \
  22. libmysqlclient-dev \
  23. mongodb-org-shell \
  24. libsqlite3-dev sqlite3 `# Database libraries` \
  25. zlib1g-dev python-software-properties \
  26. libreadline6-dev \
  27. libbz2-dev \
  28. libyaml-dev libxml2-dev \
  29. libxslt-dev libgdbm-dev ncurses-dev \
  30. libffi-dev htop libtool bison libevent-dev \
  31. libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \
  32. liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev \
  33. libjson0-dev libmcrypt-dev libicu-dev gettext \
  34. libpq-dev mlton \
  35. cloc dstat `# Collect resource usage statistics`
  36. # Install gcc-4.8
  37. sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  38. sudo apt-get -y update
  39. sudo apt-get install -y gcc-4.8 g++-4.8
  40. # Stop permanently overwriting people's files just for
  41. # trying out our software!
  42. RETCODE=$(fw_exists ~/.bash_profile.bak)
  43. [ ! "$RETCODE" == 0 ] || { \
  44. echo "Backing up your original ~/.bash_profile, ~/.profile, ~/.bashrc"
  45. mv ~/.bash_profile ~/.bash_profile.bak || true
  46. mv ~/.profile ~/.profile.bak || true
  47. mv ~/.bashrc ~/.bashrc.bak || true
  48. }
  49. sudo sh -c "echo '* - nofile 65535' >> /etc/security/limits.conf"
  50. touch fwbm_prereqs_installed