To get started with librados, a development environment is needed. For the examples in this chapter, one of the monitor nodes can be used to act as both the development environment and the client to run the developed application. The examples in this book assume you are using a Debian-based distribution:
- Install the base build tools for the operating system:
$ sudo apt-get install build-essential
The preceding command gives the following output:
- Install the librados development library:
$ sudo apt-get install librados-dev
The preceding command gives the following output:
- Create a quick application written in C to establish a connection to the test Ceph cluster:
$ mkdir test_app
$ cd test_app
- Create a file called test_app.c with your favorite text editor and place the following in it:
#include <rados/librados.h>
#include <stdio...