Appendix: Installing Apache Qpid Proton-C on an Azure Linux VM
Updated: July 1, 2015
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:
After provisioning the portal displays the following:
In order to log on to the computer, 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 computer is 57146.
You can now connect to the computer using SSH. This example uses the PuTTY tool, as in the following screenshot:
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. 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:
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.
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
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... 18.104.22.168 Connecting to www.bizdirusa.com|22.214.171.124|: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
Extract the Proton code from the distribution archive:
tar xvfz qpid-proton-0.4.tar.gz
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 computer and ready for use.