OpenSIPS Console (osipsconsole) installation
osipsconsole is a console like utility for provisioning OpenSIPS. It is to replace opensipsctl and opensipsdbctl.
osipsconsole is available only starting with OpenSIPS version 1.5.0 .
2.1 Perl requirements
For the osipsconsole tool the following perl modules are needed:
- DBI
- DBD::mysql
- DBD::Pg
- DBD::Oracle
- BerkeleyDB
- Frontier::RPC2
2.2 Debian/Ubuntu Installation
In order for the script to work, there are listed bellow the modules needed and their debian package correspondent, a brief description of each package and whether it is mandatory to install it or not. ( To be mentioned the fact that these packages have been tested in Debian and Ubuntu distros. )
Perl module | Debian Package | Description | Use |
---|---|---|---|
perl | perl | Practical Extraction and Report Language | mandatory |
DBI | libdbi-perl | Perl database interface | mandatory |
DBD::mysql | libdbd-mysql-perl | MySQL driver for the Perl5 Database Interface (DBI) | *optional |
DBD::Pg | libdbd-pg-perl | PostgreSQL database driver for the DBI module | *optional |
**DBD::Oracle | Oracle database driver for the DBI module | *optional | |
Frontier::RPC2 | libfrontier-rpc-perl | encode/decode RPC2 format XML | mandatory |
Term::ReadLine::Gnu | libterm-readline-gnu-perl | Perl extension for the GNU Readline/History Library | mandatory |
BerkeleyDB | libberkeleydb-perl | Perl extension for Berkeley DB version 2, 3 or 4 | mandatory |
Install these packages using apt-get:
apt-get install perl libdbi-perl libdbd-mysql-perl libdbd-pg-perl libfrontier-rpc-perl libterm-readline-gnu-perl libberkeleydb-perl
NOTE: * at the user's choice. At least one of the packages is mandatory, depending on the DB type used by OpenSIPS. The other ones have no need of being installed.
- Download the .tar.gz archive from: http://search.cpan.org/~pythian/DBD-Oracle-1.22/Oracle.pm
- Decompress and unpack it
- cd DBD-Oracle-1.22
- perl Makefile.PL
- make
- make test
- make install
Creating your own Debian packages for CPAN libriaries
As many Debian users probably don't really like to install modules the CPANway, here how to achieve the desired effect following "the Debian way":
apt-get install dh-make-perl
Usually running
dh-make-perl --build --cpan DBD-Whatever
should be enough. For CPAN libraries where this doesn't work please try as follows:
wget http://search.cpan.org/CPAN/.../DBD-Whatever-1.0.tar.gz tar xfz DBD-Whatever-1.0.tar.gz dh-make-perl DBD-Whatever-1.0/ cd DBD-Whatever-1.0
Adjust files in the newly created debian folder to fit your needs (if required) and build the package using dpkg-buildpackage, debuild or whatever you prefer.
cd ..
Here is your new libdbd-whatever-perl_1.0-1_all.deb :-) One last suggestion: I'm usually not building packages on my live systems but elsewhere. This helps keeping productional systems slim and "clean".