Export (0) Print
Expand All

Appendix: Installing Apache Qpid Proton-C on an Azure Linux VM

Updated: August 18, 2014

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 the steps outlined below, you will be able to run the Python and PHP samples included with this developer’s guide.

The first step is performed using the Azure Management Portal. The following screenshot shows how a CentOS VM named “scott-centos” is created:

Proton on a Azure Linux VM

After provisioning the portal displays the following:

Proton on a Azure Linux VM

In order to log on to the machine, you must know the endpoint port for SSH. You can obtain this value from the portal by selecting the newly created VM and clicking on the Endpoints tab. The following screenshot shows that the public SSH port for this machine is 57146.

Proton on a Azure Linux VM

You can now connect to the machine using SSH. This example uses the PuTTY tool, as in the following screenshot:

Proton on a Azure Linux VM

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/proton/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:

  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.

  2. Install the prerequisite packages:

    # required dependencies
    yum install gcc cmake libuuid-devel
    
    # dependencies needed for ssl support
    yum install openssl-devel
    
    # dependencies needed for bindings
    yum install swig python-devel ruby-devel php-devel java-1.6.0-openjdk
    
    # dependencies needed for python docs
    yum install epydoc
    
  3. Download the Proton library:

    [azureuser@scott-centos ~]$ wget http://www.bizdirusa.com/mirrors/apache/qpid/proton/0.4/qpid-proton-0.4.tar.gz
    --2013-05-23 21:27:55--  http://www.bizdirusa.com/mirrors/apache/qpid/proton/0.4/qpid-proton-0.4.tar.gz
    Resolving www.bizdirusa.com... 205.186.175.195
    Connecting to www.bizdirusa.com|205.186.175.195|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 456693 (446K) [application/x-gzip]
    Saving to: âqpid-proton-0.4.tar.gzâ
    
    100%[======================================>] 456,693     --.-K/s   in 0.06s
    
    2013-05-23 21:27:55 (6.84 MB/s) - qpid-proton-0.4.tar.gz
    
  4. Extract the Proton code from the distribution archive:

    tar xvfz qpid-proton-0.4.tar.gz
    
  5. Build and install the code using the following steps, taken from the Readme file:

    From the directory where you found this README file:
    
    mkdir build
    cd build
    
    # Set the install prefix. You may need to adjust depending on your
    # system.
    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
    
    # Omit the docs target if you do not wish to build or install
    # documentation.
    make all docs
    
    # Note that this step will require root privileges.
    make install
    

After performing these steps, Proton is installed on the machine and ready for use.

Show:
© 2014 Microsoft