#!/bin/sh # # chkconfig: - 85 15 # description: Zabbix server daemon # config: /etc/zabbix/zabbix_server.conf # ### BEGIN INIT INFO # Provides: zabbix # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: # Default-Stop: 0 1 2 3 4 5 6 # Short-Description: Start and stop Zabbix server # Description: Zabbix server ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions if [ -x /usr/local/sbin/zabbix_server ]; then exec=/usr/local/sbin/zabbix_server else exit 5 fi prog=${exec##*/} conf=/usr/local/etc/zabbix_server.conf if [ -f /etc/sysconfig/zabbix-server ]; then . /etc/sysconfig/zabbix-server fi lockfile=/var/lock/subsys/zabbix-server start() { echo -n $"Starting Zabbix server: " daemon $exec -c $conf rv=$? echo [ $rv -eq 0 ] && touch $lockfile return $rv } stop() { echo -n $"Shutting down Zabbix server: " killproc $prog rv=$? echo [ $rv -eq 0 ] && rm -f $lockfile return $rv } restart() { stop start } case "$1" in start|stop|restart) $1 ;; force-reload) restart ;; status) status $prog ;; try-restart|condrestart) if status $prog >/dev/null ; then restart fi ;; reload) action $"Service ${0##*/} does not support the reload action: " /bin/false exit 3 ;; *) echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" exit 2 ;; esac |
#!/bin/sh # # chkconfig: - 86 14 # description: Zabbix agent daemon # processname: zabbix_agentd # config: /etc/zabbix/zabbix_agentd.conf # ### BEGIN INIT INFO # Provides: zabbix-agent # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Should-Start: zabbix zabbix-proxy # Should-Stop: zabbix zabbix-proxy # Default-Start: # Default-Stop: 0 1 2 3 4 5 6 # Short-Description: Start and stop Zabbix agent # Description: Zabbix agent ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions if [ -x /usr/local/sbin/zabbix_agentd ]; then exec=/usr/local/sbin/zabbix_agentd else exit 5 fi prog=${exec##*/} conf=/usr/local/etc/zabbix_agentd.conf if [ -f /etc/sysconfig/zabbix-agent ]; then . /etc/sysconfig/zabbix-agent fi lockfile=/var/lock/subsys/zabbix-agent start() { echo -n $"Starting Zabbix agent: " daemon $exec -c $conf rv=$? echo [ $rv -eq 0 ] && touch $lockfile return $rv } stop() { echo -n $"Shutting down Zabbix agent: " killproc $prog rv=$? echo [ $rv -eq 0 ] && rm -f $lockfile return $rv } restart() { stop start } case "$1" in start|stop|restart) $1 ;; force-reload) restart ;; status) status $prog ;; try-restart|condrestart) if status $prog >/dev/null ; then restart fi ;; reload) action $"Service ${0##*/} does not support the reload action: " /bin/false exit 3 ;; *) echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" exit 2 ;; esac |
Setup parameters as following: DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix |
Setup parameters as following: max_execution_time = 300 max_input_time = 300 date.timezone = Asia/Shanghai |
[PostgreSQL] Description = ODBC for PostgreSQL Driver = /usr/lib/psqlodbc.so Setup = /usr/lib/libodbcpsqlS.so Driver64 = /usr/lib64/psqlodbc.so Setup64 = /usr/lib64/libodbcpsqlS.so FileUsage = 1 [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc5.so Setup = /usr/lib/libodbcmyS.so Driver64 = /usr/lib64/libmyodbc5.so Setup64 = /usr/lib64/libodbcmyS.so FileUsage = 1 [MySQL ODBC 5.3 Unicode Driver] Driver = /usr/lib64/libmyodbc5w.so UsageCount = 1 [MySQL ODBC 5.3 ANSI Driver] Driver = /usr/lib64/libmyodbc5a.so UsageCount = 1 |
[test] Description = MySQL test database Driver = MySQL Server = 127.0.0.1 User = zabbix Password = zabbix Port = 3306 Database = zabbix |
The output message are shown below: +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> |