install:devel:git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
install:devel:git [2011/10/02 20:20] – [7. Create MySQL database] miconda | install:devel:git [2019/01/11 16:20] (current) – pepelux | ||
---|---|---|---|
Line 3: | Line 3: | ||
< | < | ||
Main author: | Main author: | ||
- | | + | |
+ | |||
+ | Support: | ||
</ | </ | ||
This is a step by step tutorial about how to install and maintain Kamailio SIP server development version using the sources downloaded from GIT repository - the choice for those willing to write code for Kamailio or to try the new features to be released in the future with the next major stable version. | This is a step by step tutorial about how to install and maintain Kamailio SIP server development version using the sources downloaded from GIT repository - the choice for those willing to write code for Kamailio or to try the new features to be released in the future with the next major stable version. | ||
- | //This document focuses on Kamailio devel (at this time it is the upcoming | + | //This document focuses on Kamailio devel (at this time it is the upcoming |
==== Notes on Kamailio vs SER ==== | ==== Notes on Kamailio vs SER ==== | ||
- | Since version | + | Since version |
- | + | ||
- | The difference | + | |
- | | + | |
- | | + | |
- | You can build as well SER with these extensions by editing the Makefiles. Also, all modules | + | The 3.x.x series offered the possibility to build Kamailio and SER from same source code, meaning that they were more or less same application, |
===== 1. Prerequisites ===== | ===== 1. Prerequisites ===== | ||
Line 28: | Line 26: | ||
* __git__ client: apt-get install git-core - it is recommended to have a recent version, if your Linux distro has an old version, you can download newer one from: http:// | * __git__ client: apt-get install git-core - it is recommended to have a recent version, if your Linux distro has an old version, you can download newer one from: http:// | ||
- | * __gcc__ | + | * __gcc__ |
* __flex__ - apt-get install flex | * __flex__ - apt-get install flex | ||
* __bison__ - apt-get install bison | * __bison__ - apt-get install bison | ||
Line 38: | Line 36: | ||
* __libxml2__ - apt-get install libxml2-dev | * __libxml2__ - apt-get install libxml2-dev | ||
* __libpcre3__ - apt-get install libpcre3-dev | * __libpcre3__ - apt-get install libpcre3-dev | ||
+ | |||
+ | **Important Note**: starting with version 4.3.0, Kamailio uses the directory **/ | ||
===== 2. Getting sources from GIT ===== | ===== 2. Getting sources from GIT ===== | ||
Line 51: | Line 51: | ||
< | < | ||
- | git clone --depth 1 git://git.sip-router.org/sip-router | + | git clone --depth 1 --no-single-branch https://github.com/kamailio/ |
cd kamailio | cd kamailio | ||
</ | </ | ||
+ | //Note: if your git client version does not support **--no-single-branch** command line parameter, then just remove it.// | ||
===== 3.Tuning Makefiles ===== | ===== 3.Tuning Makefiles ===== | ||
- | The **most important and first step** is to set build flavour to **kamailio**. | + | The first step is to generate |
< | < | ||
- | make FLAVOUR=kamailio | + | make cfg |
</ | </ | ||
- | |||
- | If you forget to set the flavour to kamailio, the default build is SER (note that SER flavour does not enable by default Kamailio' | ||
Next step is to enable the MySQL module. Edit **modules.lst** file: | Next step is to enable the MySQL module. Edit **modules.lst** file: | ||
< | < | ||
- | nano -w modules.lst | + | nano -w src/modules.lst |
</ | </ | ||
Line 80: | Line 78: | ||
Save the **modules.lst** and exit. | Save the **modules.lst** and exit. | ||
- | NOTE: this is one mechanism to enable modules which are not compiled by default, such as lcr, dialplan, presence -- add the modules to **include_modules** variable inside the **modules.lst** file. | + | **NOTE**: this is one mechanism to enable modules which are not compiled by default, such as lcr, dialplan, presence -- add the modules to **include_modules** variable inside the **modules.lst** file. |
Alternative is to set ' | Alternative is to set ' | ||
< | < | ||
- | make FLAVOUR=kamailio | + | make include_modules=" |
</ | </ | ||
- | If you want to install everything in one directory (so you can delete all installed files at once), say / | + | **NOTE**: |
< | < | ||
- | make PREFIX="/ | + | make PREFIX="/ |
</ | </ | ||
Line 98: | Line 96: | ||
* http:// | * http:// | ||
+ | **NOTE**: Previous release series 3.x.x used FLAVOUR mechanism to set the name of the application to **kamailio**. Starting with 4.0.0, the default is **kamailio**. From that version, if you want to build **ser** flavour, use **FLAVOUR=ser** in the make command to generate the build configs. | ||
===== 4. Compile Kamailio ===== | ===== 4. Compile Kamailio ===== | ||
Line 134: | Line 133: | ||
* __kamdbctl__ - script to create and manage the Databases | * __kamdbctl__ - script to create and manage the Databases | ||
* __kamctl__ - script to manage and control Kamailio SIP server | * __kamctl__ - script to manage and control Kamailio SIP server | ||
- | * __sercmd__ | + | * __kamcmd__ |
To be able to use the binaries from command line, make sure that '/ | To be able to use the binaries from command line, make sure that '/ | ||
Line 147: | Line 146: | ||
< | < | ||
/ | / | ||
- | / | ||
</ | </ | ||
+ | Note: On 64 bit systems, / | ||
The documentation and readme files are installed in: | The documentation and readme files are installed in: | ||
Line 169: | Line 168: | ||
</ | </ | ||
- | In case you set the PREFIX variable in 'make cfg ...' command, then replace **/ | + | **NOTE: |
===== 7. Create MySQL database ===== | ===== 7. Create MySQL database ===== | ||
Line 192: | Line 191: | ||
</ | </ | ||
- | You can call this script without any parameter to get some help for the usage. You will be asked for the domain name Kamailio | + | You can call this script without any parameter to get some help for the usage. You will be asked for the domain name Kamailio is going to serve (e.g., mysipserver.com) and the password of the ' |
The script will add two users in MySQL: | The script will add two users in MySQL: | ||
- | - **openser** - (with default password 'openserrw') - user which has full access rights to 'openser' database | + | - **kamailio** - (with default password 'kamailiorw') - user which has full access rights to 'kamailio' database |
- | - **openserro** - (with default password 'openserro') - user which has read-only access rights to 'openser' database | + | - **kamailioro** - (with default password 'kamailioro') - user which has read-only access rights to 'kamailio' database |
**__Do change the passwords for these two users to something different that the default values that come with sources.__** | **__Do change the passwords for these two users to something different that the default values that come with sources.__** | ||
Line 218: | Line 217: | ||
</ | </ | ||
- | If you changed the password for the 'openser' user of MySQL, you have to update the value for ' | + | If you changed the password for the 'kamailio' user of MySQL, you have to update the value for ' |
You can browse [[http:// | You can browse [[http:// | ||
Line 224: | Line 223: | ||
===== 9. The init.d script ===== | ===== 9. The init.d script ===== | ||
- | The init.d script can be used to start/stop the Kamailio | + | The init.d script can be used to start/stop the Kamailio server in a nicer way. A sample of init.d script for Kamailio is provided at: |
- | + | ||
- | < | + | |
- | / | + | |
- | </ | + | |
< | < | ||
Line 240: | Line 235: | ||
</ | </ | ||
- | then edit the file updating the $DAEMON | + | then edit the file updating the $DAEMON |
< | < | ||
DAEMON=/ | DAEMON=/ | ||
+ | CFGFILE=/ | ||
</ | </ | ||
Line 270: | Line 267: | ||
</ | </ | ||
- | Then you can start/stop Kamailio | + | Then you can start/stop Kamailio using the following commands: |
< | < | ||
Line 308: | Line 305: | ||
</ | </ | ||
- | Now you have the latest Kamailio | + | Now you have the latest Kamailio devel running on your system. |
Line 320: | Line 317: | ||
</ | </ | ||
- | then an update has been made to Kamailio | + | then an update has been made to Kamailio devel version and it will be available to the public GIT in no time. |
install/devel/git.1317586833.txt.gz · Last modified: 2011/10/02 20:20 by miconda