From dbeb1cd90c8f4596b2682f6c6d0182b25287391f Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 19 Aug 2015 08:20:06 -0700 Subject: [PATCH] update debian install instructions --- INSTALL | 16 ++++++++++--- src/node/README.md | 6 ++--- src/php/README.md | 46 +++++++++++++++++++++++++++++------- src/python/README.md | 6 ++--- src/python/grpcio/README.rst | 3 +-- src/ruby/README.md | 12 ++++------ 6 files changed, 60 insertions(+), 29 deletions(-) diff --git a/INSTALL b/INSTALL index 808166dfede..5c76de8fb41 100644 --- a/INSTALL +++ b/INSTALL @@ -15,19 +15,29 @@ wiki pages: $ make $ sudo make install +OR, on Linux (Debian): + + $ sudo apt-get install libgrpc-dev + + Note: you will need to add the Debian 'unstable' distribution to your source + file first. Example: Add the following line to your `/etc/apt/sources.list` + file. + + deb http://ftp.us.debian.org/debian unstable main contrib non-free + You don't need anything else than GNU Make, gcc and autotools. Under a Debian or Ubuntu system, this should boil down to the following packages: - $ apt-get install build-essential autoconf libtool + $ apt-get install build-essential autoconf libtool Building the python wrapper requires the following: - # apt-get install python-all-dev python-virtualenv + $ apt-get install python-all-dev python-virtualenv If you want to install in a different directory than the default /usr/lib, you can override it on the command line: - # make install prefix=/opt + $ make install prefix=/opt ******************************* diff --git a/src/node/README.md b/src/node/README.md index 7d3d8c7fa10..61f4a01edd6 100644 --- a/src/node/README.md +++ b/src/node/README.md @@ -5,11 +5,10 @@ Alpha : Ready for early adopters ## PREREQUISITES - `node`: This requires `node` to be installed. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package. -- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core. +- [homebrew][] on Mac OS X. These simplify the installation of the gRPC C core. ## INSTALLATION -On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][]. -Run the following command to install gRPC Node.js. +On Mac OS X, install [homebrew][]. Run the following command to install gRPC Node.js. ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s nodejs ``` @@ -88,5 +87,4 @@ ServerCredentials An object with factory methods for creating credential objects for servers. [homebrew]:http://brew.sh -[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install diff --git a/src/php/README.md b/src/php/README.md index 1804606e091..b40a0d41781 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -7,17 +7,17 @@ This directory contains source code for PHP implementation of gRPC layered on sh Alpha : Ready for early adopters -## ENVIRONMENT +## Environment Prerequisite: PHP 5.5 or later, `phpunit`, `pecl` -Linux: +**Linux:** ```sh $ sudo apt-get install php5 php5-dev phpunit php-pear ``` -OS X: +**Mac OS X:** ```sh $ curl https://phar.phpunit.de/phpunit.phar -o phpunit.phar @@ -28,10 +28,39 @@ $ curl -O http://pear.php.net/go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar ``` -## Build from Homebrew +## Quick Install -On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][]. Run the following command to -install gRPC. +**Linux (Debian):** + +Add [debian unstable][] (sid) to your `sources.list` file. Example: + +```sh +echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | \ +sudo tee -a /etc/apt/sources.list +``` + +Install the gRPC debian package + +```sh +sudo apt-get update +sudo apt-get install libgrpc-dev +``` + +Install the gRPC PHP extension + +```sh +sudo pecl install grpc-alpha +``` + +**Mac OS X:** + +Install [homebrew][]. Example: + +```sh +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` + +Install the gRPC core library and the PHP extension in one step ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s php @@ -39,6 +68,7 @@ $ curl -fsSL https://goo.gl/getgrpc | bash -s php This will download and run the [gRPC install script][] and compile the gRPC PHP extension. + ## Build from Source Clone this repository @@ -71,7 +101,7 @@ $ sudo make install Install the gRPC PHP extension ```sh -$ sudo pecl install grpc +$ sudo pecl install grpc-alpha ``` OR @@ -140,6 +170,6 @@ $ ./bin/run_gen_code_test.sh ``` [homebrew]:http://brew.sh -[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install [Node]:https://github.com/grpc/grpc/tree/master/src/node/examples +[debian unstable]:https://www.debian.org/releases/sid/ diff --git a/src/python/README.md b/src/python/README.md index 2beb3a913a9..2a8ae3c6044 100644 --- a/src/python/README.md +++ b/src/python/README.md @@ -9,12 +9,11 @@ Alpha : Ready for early adopters PREREQUISITES ------------- - Python 2.7, virtualenv, pip -- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core. +- [homebrew][] on Mac OS X. These simplify the installation of the gRPC C core. INSTALLATION ------------- -On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][]. -Run the following command to install gRPC Python. +On Mac OS X, install [homebrew][]. Run the following command to install gRPC Python. ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s python ``` @@ -60,7 +59,6 @@ $ ../../tools/distrib/python/submit.py ``` [homebrew]:http://brew.sh -[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install [Quick Start]:http://www.grpc.io/docs/tutorials/basic/python.html [detailed example]:http://www.grpc.io/docs/installation/python.html diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index 00bdecf56ff..c7b5a3bde43 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -6,7 +6,7 @@ Package for GRPC Python. Dependencies ------------ -Ensure you have installed the gRPC core. On Mac OS X, install homebrew_. On Linux, install linuxbrew_. +Ensure you have installed the gRPC core. On Mac OS X, install homebrew_. Run the following command to install gRPC Python. :: @@ -19,5 +19,4 @@ Otherwise, `install from source`_ .. _`install from source`: https://github.com/grpc/grpc/blob/master/src/python/README.md#building-from-source .. _homebrew: http://brew.sh -.. _linuxbrew: https://github.com/Homebrew/linuxbrew#installation .. _`gRPC install script`: https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install diff --git a/src/ruby/README.md b/src/ruby/README.md index 4b657c0bd4f..dd6671bb660 100644 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -12,12 +12,11 @@ PREREQUISITES ------------- - Ruby 2.x. The gRPC API uses keyword args. -- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core. +- [homebrew][] on Mac OS X. These simplify the installation of the gRPC C core. INSTALLATION --------------- -On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][]. -Run the following command to install gRPC Ruby. +On Mac OS X, install [homebrew][]. Run the following command to install gRPC Ruby. ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s ruby ``` @@ -26,11 +25,9 @@ This will download and run the [gRPC install script][], then install the latest BUILD FROM SOURCE --------------------- - Clone this repository -- Build the gRPC C core -E.g, from the root of the gRPC [Git repository](https://github.com/google/grpc) +- Install the gRPC core library. Please refer to the [INSTALL](https://github.com/grpc/grpc/blob/master/INSTALL) file for more instructions. ```sh -$ cd ../.. -$ make && sudo make install +$ sudo apt-get install libgrpc-dev ``` - Install Ruby 2.x. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling @@ -77,7 +74,6 @@ Directory structure is the layout for [ruby extensions][] GRPC.logger.info("Answer: #{resp.inspect}") ``` [homebrew]:http://brew.sh -[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install [ruby extensions]:http://guides.rubygems.org/gems-with-extensions/ [rubydoc]: http://www.rubydoc.info/gems/grpc