CentOS: Configurar Perl DBD Module para conectar a bases de datos SQL Server
Intro
Pre-Req
Para ejecutar el siguiente tutorial se recomienda haber leido y ejecutado los siguientes (en orden):
CentOS: Instalar y configurar perl
CentOS: Instalar y configurar FreeTDS
How to
1.Get Source
Here you have two choices
a) Execute as root
perl -MCPAN -e 'install DBD::Sybase'
Or
b)
wget http://search.cpan.org/CPAN/authors/id/M/ME/MEWP/DBD-Sybase-1.09.tar.gz tar xfvz DBD-Sybase-1.09.tar.gz cd DBD-Sybase-1.09
2. Modify sources to compile by hand
Now, follow next steps (http://www.monitoring-portal.org/wbb/index.php?page=Thread&threadID=14583). If you choice A option, then search dbimp.c file inside your /root/.cpan/build folder. If you choice B option, then just search in your current DBD-Sybase-1.09 folder like the above link
There you need to patch the file “dbdimp.c” (vi dbdimp.c).
Search there for the syntax “syb_init”. Add some lines before the function:
#undef CS_VERSION_150 #undef CS_VERSION_125 #undef CS_VERSION_120 #undef CS_DATE_TYPE #undef CS_BIGINT_TYPE
3. Compile and Install
Start Compiling
perl Makefile.PL
When ask for Sybase server to use (default: SYBASE) type your [SQLSERVER] added to freetds
Now type
make test
At last type
make install
Another possibility to configure DBD::Sybase is (http://monkeygumbo.com/news/mt/mt-comments.cgi?entry_id=318)
-
February 11, 2013 at 5:37 pm | #1Nagios: Configure check_mssql_health on CentOS « Void Technology