Merge pull request #2990 from stanley-cheung/update_debian_instructions

Update debian install instructions
pull/3007/head
Tim Emiola 9 years ago
commit d7c27c61a8
  1. 23
      INSTALL
  2. 32
      src/node/README.md
  3. 46
      src/php/README.md
  4. 37
      src/python/README.md
  5. 3
      src/python/grpcio/README.rst
  6. 38
      src/ruby/README.md

@ -9,25 +9,40 @@ wiki pages:
* If you are in a hurry * * If you are in a hurry *
************************* *************************
On Linux (Debian):
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
Install the gRPC library:
$ [sudo] apt-get install libgrpc-dev
OR
$ git clone https://github.com/grpc/grpc.git $ git clone https://github.com/grpc/grpc.git
$ cd grpc $ cd grpc
$ git submodule update --init $ git submodule update --init
$ make $ make
$ sudo make install $ [sudo] make install
You don't need anything else than GNU Make, gcc and autotools. Under a Debian 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: 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: 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 If you want to install in a different directory than the default /usr/lib, you can
override it on the command line: override it on the command line:
# make install prefix=/opt $ [sudo] make install prefix=/opt
******************************* *******************************

@ -5,11 +5,35 @@ Alpha : Ready for early adopters
## PREREQUISITES ## 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. - `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 ## INSTALLATION
On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
Run the following command to install gRPC Node.js. **Linux (Debian):**
Add [Debian unstable][] 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 NPM package
```sh
npm install grpc
```
**Mac OS X**
Install [homebrew][]. Run the following command to install gRPC Node.js.
```sh ```sh
$ curl -fsSL https://goo.gl/getgrpc | bash -s nodejs $ curl -fsSL https://goo.gl/getgrpc | bash -s nodejs
``` ```
@ -88,5 +112,5 @@ ServerCredentials
An object with factory methods for creating credential objects for servers. An object with factory methods for creating credential objects for servers.
[homebrew]:http://brew.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 [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
[Debian unstable]:https://www.debian.org/releases/sid/

@ -7,17 +7,17 @@ This directory contains source code for PHP implementation of gRPC layered on sh
Alpha : Ready for early adopters Alpha : Ready for early adopters
## ENVIRONMENT ## Environment
Prerequisite: PHP 5.5 or later, `phpunit`, `pecl` Prerequisite: PHP 5.5 or later, `phpunit`, `pecl`
Linux: **Linux:**
```sh ```sh
$ sudo apt-get install php5 php5-dev phpunit php-pear $ sudo apt-get install php5 php5-dev phpunit php-pear
``` ```
OS X: **Mac OS X:**
```sh ```sh
$ curl https://phar.phpunit.de/phpunit.phar -o phpunit.phar $ 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 $ 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 **Linux (Debian):**
install gRPC.
Add [Debian unstable][] 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 ```sh
$ curl -fsSL https://goo.gl/getgrpc | bash -s php $ 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. This will download and run the [gRPC install script][] and compile the gRPC PHP extension.
## Build from Source ## Build from Source
Clone this repository Clone this repository
@ -71,7 +101,7 @@ $ sudo make install
Install the gRPC PHP extension Install the gRPC PHP extension
```sh ```sh
$ sudo pecl install grpc $ sudo pecl install grpc-alpha
``` ```
OR OR
@ -140,6 +170,6 @@ $ ./bin/run_gen_code_test.sh
``` ```
[homebrew]:http://brew.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 [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
[Node]:https://github.com/grpc/grpc/tree/master/src/node/examples [Node]:https://github.com/grpc/grpc/tree/master/src/node/examples
[Debian unstable]:https://www.debian.org/releases/sid/

@ -9,12 +9,36 @@ Alpha : Ready for early adopters
PREREQUISITES PREREQUISITES
------------- -------------
- Python 2.7, virtualenv, pip - 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 INSTALLATION
------------- -------------
On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
Run the following command to install gRPC Python. **Linux (Debian):**
Add [Debian unstable][] 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 Python module
```sh
sudo pip install grpcio
```
**Mac OS X**
Install [homebrew][]. Run the following command to install gRPC Python.
```sh ```sh
$ curl -fsSL https://goo.gl/getgrpc | bash -s python $ curl -fsSL https://goo.gl/getgrpc | bash -s python
``` ```
@ -27,11 +51,6 @@ Please read our online documentation for a [Quick Start][] and a [detailed examp
BUILDING FROM SOURCE BUILDING FROM SOURCE
--------------------- ---------------------
- Clone this repository - 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 - Use build_python.sh to build the Python code and install it into a virtual environment
``` ```
@ -60,7 +79,7 @@ $ ../../tools/distrib/python/submit.py
``` ```
[homebrew]:http://brew.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 [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
[Quick Start]:http://www.grpc.io/docs/tutorials/basic/python.html [Quick Start]:http://www.grpc.io/docs/tutorials/basic/python.html
[detailed example]:http://www.grpc.io/docs/installation/python.html [detailed example]:http://www.grpc.io/docs/installation/python.html
[Debian unstable]:https://www.debian.org/releases/sid/

@ -6,7 +6,7 @@ Package for GRPC Python.
Dependencies 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. 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 .. _`install from source`: https://github.com/grpc/grpc/blob/master/src/python/README.md#building-from-source
.. _homebrew: http://brew.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 .. _`gRPC install script`: https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install

@ -12,12 +12,36 @@ PREREQUISITES
------------- -------------
- Ruby 2.x. The gRPC API uses keyword args. - 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 INSTALLATION
--------------- ---------------
On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
Run the following command to install gRPC Ruby. **Linux (Debian):**
Add [Debian unstable][] 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 Ruby package
```sh
gem install grpc
```
**Mac OS X**
Install [homebrew][]. Run the following command to install gRPC Ruby.
```sh ```sh
$ curl -fsSL https://goo.gl/getgrpc | bash -s ruby $ curl -fsSL https://goo.gl/getgrpc | bash -s ruby
``` ```
@ -26,12 +50,6 @@ This will download and run the [gRPC install script][], then install the latest
BUILD FROM SOURCE BUILD FROM SOURCE
--------------------- ---------------------
- Clone this repository - Clone this repository
- Build the gRPC C core
E.g, from the root of the gRPC [Git repository](https://github.com/google/grpc)
```sh
$ cd ../..
$ make && sudo make install
```
- Install Ruby 2.x. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling - 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. the exact ruby version that's used.
@ -77,8 +95,8 @@ Directory structure is the layout for [ruby extensions][]
GRPC.logger.info("Answer: #{resp.inspect}") GRPC.logger.info("Answer: #{resp.inspect}")
``` ```
[homebrew]:http://brew.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 [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
[ruby extensions]:http://guides.rubygems.org/gems-with-extensions/ [ruby extensions]:http://guides.rubygems.org/gems-with-extensions/
[rubydoc]: http://www.rubydoc.info/gems/grpc [rubydoc]: http://www.rubydoc.info/gems/grpc
[grpc.io]: http://www.grpc.io/docs/installation/ruby.html [grpc.io]: http://www.grpc.io/docs/installation/ruby.html
[Debian unstable]:https://www.debian.org/releases/sid/

Loading…
Cancel
Save