Advertising:

Instalacion de ODBC en Zabbix Server 7

From Zabbix-ES
Revision as of 09:59, 19 August 2024 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Monitorizacion por ODBC

# dnf install -y unixODBC
# dnf install -y mariadb-connector-odbc
# dnf install -y https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.4.0-1.el9.x86_64.rpm
# dnf install -y postgresql-odbc
# dnf install -y epel-release
# dnf install -y freetds
# dnf install -y https://download.oracle.com/otn_software/linux/instantclient/1919000/oracle-instantclient19.19-basic-19.19.0.0.0-1.el9.x86_64.rpm
# dnf install -y https://download.oracle.com/otn_software/linux/instantclient/1919000/oracle-instantclient19.19-odbc-19.19.0.0.0-1.el9.x86_64.rpm
# dnf install -y https://download.oracle.com/otn_software/linux/instantclient/1919000/oracle-instantclient19.19-sqlplus-19.19.0.0.0-1.el9.x86_64.rpm

Instalacion del Repositorio de EPEL en RHEL9

Nota: Esto es requerido para poder instalar el FREETDS
# subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y
# vi /etc/odbcinst.ini
[Oracle ODBC driver]
Description     = Oracle ODBC driver
Driver          = /usr/lib/oracle/19.19/client64/lib/libsqora.so.19.1
Setup           =
FileUsage       =
CPTimeout       =
CPReuse         =
Driver Logging  = 7
# odbcinst -q -d
# odbcinst -j
# vi /etc/environment 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/19.19/client64/lib/
# vi /etc/sysconfig/zabbix-agent2
ORACLE_HOME=/usr/lib/oracle/19.19/client64/
# systemctl restart zabbix-agent2.service

Configuracion del Profile de Oracle (/oracle/.bash_profile)

# Configuracion profile Oracle
export ORACLE_HOME=/usr/lib/oracle/19.19/client64/
export PATH=$ORACLE_HOME:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/19.19/client64/lib/
export TNS_ADMIN=/oracle/network/admin
echo "- Profile de Oracle configuraro"
echo "  ORACLE_HOME: $ORACLE_HOME"
echo "  TNS_ADMIN  : $TNS_ADMIN"
echo