From dbeb1cd90c8f4596b2682f6c6d0182b25287391f Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 19 Aug 2015 08:20:06 -0700 Subject: [PATCH 1/4] 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 From a79a896d4cc12d4ee594e37afee65fdb30f5d274 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 19 Aug 2015 10:43:28 -0700 Subject: [PATCH 2/4] update installation instructions, review feedback --- INSTALL | 24 ++++++++++++++---------- src/node/README.md | 22 +++++++++++++++++++++- src/python/README.md | 22 +++++++++++++++++++++- src/ruby/README.md | 26 +++++++++++++++++++++----- 4 files changed, 77 insertions(+), 17 deletions(-) diff --git a/INSTALL b/INSTALL index 5c76de8fb41..b4a53bbba1b 100644 --- a/INSTALL +++ b/INSTALL @@ -9,21 +9,25 @@ wiki pages: * If you are in a hurry * ************************* - $ git clone https://github.com/grpc/grpc.git - $ cd grpc - $ git submodule update --init - $ make - $ sudo make install +On Linux (Debian): + + Note: you will need to add the Debian 'unstable' distribution to your source + file first. + + Add the following line to your `/etc/apt/sources.list` file: -OR, on Linux (Debian): + deb http://ftp.us.debian.org/debian unstable main contrib non-free + Install the gRPC library $ 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. +OR - deb http://ftp.us.debian.org/debian unstable main contrib non-free + $ git clone https://github.com/grpc/grpc.git + $ cd grpc + $ git submodule update --init + $ make + $ sudo make install 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: diff --git a/src/node/README.md b/src/node/README.md index 61f4a01edd6..08ccedf7d81 100644 --- a/src/node/README.md +++ b/src/node/README.md @@ -8,7 +8,26 @@ Alpha : Ready for early adopters - [homebrew][] on Mac OS X. These simplify the installation of the gRPC C core. ## INSTALLATION -On Mac OS X, install [homebrew][]. Run the following command to install gRPC Node.js. + +**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 +``` + +**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,3 +107,4 @@ An object with factory methods for creating credential objects for servers. [homebrew]:http://brew.sh [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install +[debian unstable]:https://www.debian.org/releases/sid/ diff --git a/src/python/README.md b/src/python/README.md index 2a8ae3c6044..b3b2f303d45 100644 --- a/src/python/README.md +++ b/src/python/README.md @@ -13,7 +13,26 @@ PREREQUISITES INSTALLATION ------------- -On Mac OS X, install [homebrew][]. Run the following command to install gRPC Python. + +**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 +``` + +**Mac OS X** + +Install [homebrew][]. Run the following command to install gRPC Python. ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s python ``` @@ -62,3 +81,4 @@ $ ../../tools/distrib/python/submit.py [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 +[debian unstable]:https://www.debian.org/releases/sid/ diff --git a/src/ruby/README.md b/src/ruby/README.md index dd6671bb660..979fb1a70b6 100644 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -16,7 +16,26 @@ PREREQUISITES INSTALLATION --------------- -On Mac OS X, install [homebrew][]. Run the following command to install gRPC Ruby. + +**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 +``` + +**Mac OS X** + +Install [homebrew][]. Run the following command to install gRPC Ruby. ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s ruby ``` @@ -25,10 +44,6 @@ This will download and run the [gRPC install script][], then install the latest BUILD FROM SOURCE --------------------- - Clone this repository -- Install the gRPC core library. Please refer to the [INSTALL](https://github.com/grpc/grpc/blob/master/INSTALL) file for more instructions. -```sh -$ 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 the exact ruby version that's used. @@ -78,3 +93,4 @@ Directory structure is the layout for [ruby extensions][] [ruby extensions]:http://guides.rubygems.org/gems-with-extensions/ [rubydoc]: http://www.rubydoc.info/gems/grpc [grpc.io]: http://www.grpc.io/docs/installation/ruby.html +[debian unstable]:https://www.debian.org/releases/sid/ From 5329e4bd3f7c5580b67a784c64a7aacbd5cb3549 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 19 Aug 2015 15:59:59 -0700 Subject: [PATCH 3/4] update installation instructions, review feedback --- INSTALL | 17 +++++++++-------- src/node/README.md | 4 ++-- src/php/README.md | 4 ++-- src/python/README.md | 14 +++++++------- src/ruby/README.md | 4 ++-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/INSTALL b/INSTALL index b4a53bbba1b..d183fceb9ae 100644 --- a/INSTALL +++ b/INSTALL @@ -11,15 +11,16 @@ wiki pages: On Linux (Debian): - Note: you will need to add the Debian 'unstable' distribution to your source + Note: you will need to add the Debian 'unstable' distribution to your sources file first. Add the following line to your `/etc/apt/sources.list` file: - deb http://ftp.us.debian.org/debian unstable main contrib non-free + deb http://ftp.us.debian.org/debian unstable main contrib non-free - Install the gRPC library - $ sudo apt-get install libgrpc-dev + Install the gRPC library: + + $ [sudo] apt-get install libgrpc-dev OR @@ -27,21 +28,21 @@ OR $ cd grpc $ git submodule update --init $ make - $ sudo make install + $ [sudo] make install 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 + $ [sudo] apt-get install build-essential autoconf libtool Building the python wrapper requires the following: - $ apt-get install python-all-dev python-virtualenv + $ [sudo] 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 + $ [sudo] make install prefix=/opt ******************************* diff --git a/src/node/README.md b/src/node/README.md index 08ccedf7d81..a945295ff30 100644 --- a/src/node/README.md +++ b/src/node/README.md @@ -11,7 +11,7 @@ Alpha : Ready for early adopters **Linux (Debian):** -Add [debian unstable][] (sid) to your `sources.list` file. Example: +Add [Debian unstable][] to your `sources.list` file. Example: ```sh echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | \ @@ -107,4 +107,4 @@ An object with factory methods for creating credential objects for servers. [homebrew]:http://brew.sh [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install -[debian unstable]:https://www.debian.org/releases/sid/ +[Debian unstable]:https://www.debian.org/releases/sid/ diff --git a/src/php/README.md b/src/php/README.md index b40a0d41781..01c4db61aee 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -32,7 +32,7 @@ $ sudo php -d detect_unicode=0 go-pear.phar **Linux (Debian):** -Add [debian unstable][] (sid) to your `sources.list` file. Example: +Add [Debian unstable][] to your `sources.list` file. Example: ```sh echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | \ @@ -172,4 +172,4 @@ $ ./bin/run_gen_code_test.sh [homebrew]:http://brew.sh [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/ +[Debian unstable]:https://www.debian.org/releases/sid/ diff --git a/src/python/README.md b/src/python/README.md index b3b2f303d45..a7afd581b2f 100644 --- a/src/python/README.md +++ b/src/python/README.md @@ -16,7 +16,7 @@ INSTALLATION **Linux (Debian):** -Add [debian unstable][] (sid) to your `sources.list` file. Example: +Add [Debian unstable][] to your `sources.list` file. Example: ```sh echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | \ @@ -30,6 +30,11 @@ sudo apt-get update sudo apt-get install libgrpc-dev ``` +Install the gRPC Python module +```sh +sudo pip install grpcio +``` + **Mac OS X** Install [homebrew][]. Run the following command to install gRPC Python. @@ -45,11 +50,6 @@ Please read our online documentation for a [Quick Start][] and a [detailed examp BUILDING FROM SOURCE --------------------- - Clone this repository -- Build the gRPC core from the root of the - [gRPC Git repository](https://github.com/grpc/grpc) -``` -$ make shared_c static_c -``` - Use build_python.sh to build the Python code and install it into a virtual environment ``` @@ -81,4 +81,4 @@ $ ../../tools/distrib/python/submit.py [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 -[debian unstable]:https://www.debian.org/releases/sid/ +[Debian unstable]:https://www.debian.org/releases/sid/ diff --git a/src/ruby/README.md b/src/ruby/README.md index 979fb1a70b6..71404a26716 100644 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -19,7 +19,7 @@ INSTALLATION **Linux (Debian):** -Add [debian unstable][] (sid) to your `sources.list` file. Example: +Add [Debian unstable][] to your `sources.list` file. Example: ```sh echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | \ @@ -93,4 +93,4 @@ Directory structure is the layout for [ruby extensions][] [ruby extensions]:http://guides.rubygems.org/gems-with-extensions/ [rubydoc]: http://www.rubydoc.info/gems/grpc [grpc.io]: http://www.grpc.io/docs/installation/ruby.html -[debian unstable]:https://www.debian.org/releases/sid/ +[Debian unstable]:https://www.debian.org/releases/sid/ From 1894f188bf062a86ed6ad1727792997ebb8cc5ec Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 19 Aug 2015 16:32:39 -0700 Subject: [PATCH 4/4] update installation instructions, review feedback --- src/node/README.md | 8 +++++++- src/php/README.md | 2 +- src/python/README.md | 3 ++- src/ruby/README.md | 8 +++++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/node/README.md b/src/node/README.md index a945295ff30..b6411537c7b 100644 --- a/src/node/README.md +++ b/src/node/README.md @@ -18,13 +18,19 @@ 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 +Install the gRPC Debian package ```sh sudo apt-get update sudo apt-get install libgrpc-dev ``` +Install the gRPC NPM package + +```sh +npm install grpc +``` + **Mac OS X** Install [homebrew][]. Run the following command to install gRPC Node.js. diff --git a/src/php/README.md b/src/php/README.md index 01c4db61aee..f432935fde3 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -39,7 +39,7 @@ 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 +Install the gRPC Debian package ```sh sudo apt-get update diff --git a/src/python/README.md b/src/python/README.md index a7afd581b2f..de0142db05e 100644 --- a/src/python/README.md +++ b/src/python/README.md @@ -23,7 +23,7 @@ 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 +Install the gRPC Debian package ```sh sudo apt-get update @@ -31,6 +31,7 @@ sudo apt-get install libgrpc-dev ``` Install the gRPC Python module + ```sh sudo pip install grpcio ``` diff --git a/src/ruby/README.md b/src/ruby/README.md index 71404a26716..f8902e34c5a 100644 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -26,13 +26,19 @@ 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 +Install the gRPC Debian package ```sh sudo apt-get update sudo apt-get install libgrpc-dev ``` +Install the gRPC Ruby package + +```sh +gem install grpc +``` + **Mac OS X** Install [homebrew][]. Run the following command to install gRPC Ruby.