The Basics Of Building Kamailio From Source Using CMake
Building Kamailio From Source Using CMake - ToC
This guide will walk you through the process of building Kamailio from source using CMake.
Prerequisites
Before you begin, ensure you have the following installed:
For building core Kamailio:
- Git
- CMake (version 3.10 or higher)
- GCC (GNU Compiler Collection)
- Bison and Flex (for parsing)
For additional features (CMake will error or warn if a library is not found):
- MySQL or PostgreSQL (for database support) (optional)
- OpenSSL (for TLS support) (optional)
- libxml2 (for XML support) (optional)
- many more (check each module's documentation for specific requirements)
Building Kamailio
- Clone the Kamailio repository from GitHub:
- Navigate to the Kamailio directory:
Using CMake commands
-
Create the build directory if it doesn't exist and cofigure the project:
-
Build the project:
- Install the project:
Or using make commands
- Create a build directory (you can name it whatever you want) and navigate to it:
- Run CMake to generate the build files:
- Build the project:
- Install the project:
Kamailio should now be installed on your system (default path is /usr/local/sbin/kamailio
).
You can start it using the following command: (you may need to use sudo
if you installed it in a system directory and use system files)
Congratulations! You have successfully built and installed Kamailio from source using CMake.