OpenSIPS Console (osipsconsole) installation

来源:互联网 发布:java asinstanceof 编辑:程序博客网 时间:2024/05/24 06:37

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 moduleDebian PackageDescriptionUseperlperlPractical Extraction and Report LanguagemandatoryDBIlibdbi-perlPerl database interfacemandatoryDBD::mysqllibdbd-mysql-perlMySQL driver for the Perl5 Database Interface (DBI)*optionalDBD::Pglibdbd-pg-perlPostgreSQL database driver for the DBI module*optional**DBD::Oracle Oracle database driver for the DBI module*optionalFrontier::RPC2libfrontier-rpc-perlencode/decode RPC2 format XMLmandatoryTerm::ReadLine::Gnulibterm-readline-gnu-perlPerl extension for the GNU Readline/History LibrarymandatoryBerkeleyDBlibberkeleydb-perlPerl extension for Berkeley DB version 2, 3 or 4mandatory

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.

**For the DBD::Oracle module there is no debian package. This will be installed as follows:
  • 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.gztar xfz DBD-Whatever-1.0.tar.gzdh-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".


原创粉丝点击