PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/articles/service-bus/service-bus-amqp-apache.md

https://gitlab.com/yeah568/azure-content
Markdown | 119 lines | 80 code | 39 blank | 0 comment | 0 complexity | d43bb67a6326a19496dc0c14228e7792 MD5 | raw file
  1. <properties
  2. pageTitle="How to install Apache Qpid Proton-C on a Linux VM | Microsoft Azure"
  3. description="How to create a CentOS Linux VM using Azure Virtual Machines and how to build and install the Apache Qpid Proton-C library."
  4. services="service-bus"
  5. documentationCenter="na"
  6. authors="sethmanheim"
  7. manager="timlt"
  8. editor="" />
  9. <tags
  10. ms.service="service-bus"
  11. ms.devlang="na"
  12. ms.topic="article"
  13. ms.tgt_pltfrm="na"
  14. ms.workload="na"
  15. ms.date="05/06/2016"
  16. ms.author="sethm" />
  17. # Install Apache Qpid Proton-C on an Azure Linux VM
  18. [AZURE.INCLUDE [service-bus-selector-amqp](../../includes/service-bus-selector-amqp.md)]
  19. This section shows how to create a CentOS Linux VM using Azure Virtual Machines and how to download, build and install the Apache Qpid Proton-C library along with the Python and PHP language bindings. After completing these steps, you will be able to run the Python and PHP samples included with this guide.
  20. The first step is performed using the [Azure classic portal][]. The following screen shot shows how a CentOS VM named "scott-centos" is created:
  21. ![Proton on a Azure Linux VM][0]
  22. After provisioning, the portal displays the following:
  23. ![Proton on a Azure Linux VM][1]
  24. In order to log on to the computer, you must know the endpoint port for SSH. You can obtain this value from the [Azure classic portal][] by selecting the newly created VM and clicking on the **Endpoints** tab. The following screen shot shows that the public SSH port for this computer is 57146.
  25. ![Proton on a Azure Linux VM][2]
  26. You can now connect to the computer using SSH. This example uses the PuTTY tool, as in the following screen shot:
  27. ![Proton on a Azure Linux VM][3]
  28. For the Python and PHP apps, this example uses the Proton client libraries from Apache. These libraries are available for download from [http://qpid.apache.org/download.html](http://qpid.apache.org/download.html). The Readme file in the distribution package explains the steps required to install the dependencies and build Proton. Here's a summary of the steps:
  29. 1. Edit the yum config file (/etc/yum.conf) and comment out the exclusion for updates to kernel headers (\# exclude=kernel\*). This is necessary to install the gcc compiler.
  30. 2. Install the prerequisite packages:
  31. ```
  32. # required dependencies
  33. yum install gcc cmake libuuid-devel
  34. # dependencies needed for ssl support
  35. yum install openssl-devel
  36. # dependencies needed for bindings
  37. yum install swig python-devel ruby-devel php-devel java-1.6.0-openjdk
  38. # dependencies needed for python docs
  39. yum install epydoc
  40. ```
  41. 1. Download the Proton library:
  42. ```
  43. [azureuser@this-user ~]$ wget http://apache.panu.it/qpid/proton/0.9/qpid-proton-0.9.tar.gz
  44. --2016-04-17 14:45:03-- http://apache.panu.it/qpid/proton/0.9/qpid-proton-0.9.tar.gz
  45. Resolving apache.panu.it (apache.panu.it)... 81.208.22.71
  46. Connecting to apache.panu.it (apache.panu.it)|81.208.22.71|:80... connected.
  47. HTTP request sent, awaiting response... 200 OK
  48. Length: 868226 (848K) [application/x-gzip]
  49. Saving to: ‘qpid-proton-0.9.tar.gz’
  50. qpid-proton-0.9.tar.gz
  51. 100%[====================================================================================================================>] 847.88K 102KB/s in 8.4s
  52. 2016-04-17 14:45:12 (101 KB/s) - ‘qpid-proton-0.9.tar.gz’ saved [868226/868226]
  53. ```
  54. 1. Extract the Proton code from the distribution archive:
  55. ```
  56. tar xvfz qpid-proton-0.9.tar.gz
  57. ```
  58. 1. Build and install the code using the following steps, taken from the Readme file:
  59. ```
  60. From the directory where you found this README file:
  61. mkdir build cd build
  62. # Set the install prefix. You may need to adjust depending on your
  63. # system.
  64. cmake -DCMAKE\_INSTALL\_PREFIX=/usr ..
  65. # Omit the docs target if you do not wish to build or install
  66. # documentation.
  67. make all docs
  68. # Note that this step will require root privileges.
  69. make install
  70. ```
  71. After performing these steps, Proton is installed on the computer and ready for use.
  72. ## Next steps
  73. Ready to learn more? Visit the following link:
  74. - [Service Bus AMQP overview][]
  75. [Service Bus AMQP overview]: service-bus-amqp-overview.md
  76. [0]: ./media/service-bus-amqp-apache/amqp-apache-1.png
  77. [1]: ./media/service-bus-amqp-apache/amqp-apache-2.png
  78. [2]: ./media/service-bus-amqp-apache/amqp-apache-3.png
  79. [3]: ./media/service-bus-amqp-apache/amqp-apache-4.png
  80. [Azure classic portal]: http://manage.windowsazure.com