INSTALL 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. Dependencies
  2. ============
  3. grpc has few external dependencies. If needed, they are present in the
  4. third_party directory, if you have cloned the github repository recursively.
  5. If you didn't clone recursively, you can still get them later by running the
  6. following command:
  7. $ git submodule update --init
  8. Note that the Makefile makes it much easier for you to compile from sources
  9. if you were to clone recursively our git repository.
  10. grpc core currently depends on zlib and OpenSSL 1.0.2beta3, and also requires
  11. libevent2 for the Linux port.
  12. grpc++'s tests depends on protobuf 3.0.0, gtests and gflags.
  13. OpenSSL
  14. -------
  15. Secure HTTP2 requires to have the TLS extension ALPN (see rfc 7301 and
  16. http://http2.github.io/http2-spec/ section 3.3). Our HTTP2 implementation
  17. relies on OpenSSL's implementation. OpenSSL 1.0.2beta3 is the first version
  18. of OpenSSL that has ALPN support, and this explains our dependency on it.
  19. Note that the Makefile supports compiling only the unsecure elements of grpc,
  20. and if you do not have OpenSSL and do not want it, you can still proceed
  21. with installing only the elements you require. However, it is recommended
  22. to encrypt your network traffic, therefore we urge you to not use the unsecure
  23. version of grpc if possible.
  24. Compiling
  25. =========
  26. If you have all the dependencies in the third_party subfolder, you should
  27. simply be able to go ahead and run "make" to compile grpc. The other targets
  28. that you might find interesting are "buildtests" and "test".
  29. If you didn't clone from git, and thus are unable to get the required
  30. dependencies, you can manually download and unpack the necessary packages,
  31. and let the Makefile build them itself.
  32. You may also install the dependencies yourself, from the sources, or from
  33. your distribution's package manager.
  34. The development packages needed for grpc are libevent2 under Linux, and zlib.
  35. The development packages needed for grpc++'s tests are gtests, and gflags.
  36. To the best of our knowledge, no distribution has an OpenSSL package that
  37. supports ALPN yet, so you would still have to depend on installing from source
  38. for that particular dependency.
  39. The recommended version of OpenSSL that provides ALPN support is available
  40. at this URL:
  41. https://www.openssl.org/source/openssl-1.0.2-beta3.tar.gz
  42. If you want to let the Makefile build them automatically for you, please
  43. extract them in the third_party folder. You will need to rename the extracted
  44. folder the following way:
  45. openssl-1.0.2-beta3 --> openssl
  46. Testing
  47. =======
  48. At the moment, C++ tests aren't fully available yet. If you want to run tests
  49. on the C core of grpc, you can do the following:
  50. $ make buildtests_c
  51. $ make test_c
  52. Installing
  53. ==========
  54. Once everything is compiled, you should be able to install grpc and grpc++
  55. libraries and headers:
  56. $ sudo make install