Ad Widget

Collapse

Install Zabbix Agent on /var/opt ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daohai
    Junior Member
    • Oct 2019
    • 28

    #1

    Install Zabbix Agent on /var/opt ?

    Dear All,
    I have 1 question about zabbix agent install location :
    + I install zabbix agent offline by rpm package but when i install with command : rpm -ivh <filename.rpm> , it will automatic create zabbix folder in /etc so can i change default location from /etc to /opt/zabbix ?
    Thank you so much
    Last edited by daohai; 11-11-2019, 08:41.
  • valentins.grins
    Member
    • Nov 2019
    • 38

    #2
    Hello,

    If you want to load zabbix agent configuration file from another directory there are following options:
    1. Build Zabbix Agent from sources and define --sysconfdir as your want;
    2. You can try to change the zabbix-agent service systemd file(/usr/lib/systemd/system/zabbix-agent.service) and set another directory for configuration file.

    Please note that in some cases when you are templates with pre-defined user parameters(e.g. MySQL DB Template) then zabbix_agent also load additional configuration files. Directory for them is defined in zabbix_agentd.conf file under Option: Include.

    Comment

    • daohai
      Junior Member
      • Oct 2019
      • 28

      #3
      Originally posted by valentins.grins
      Hello,

      If you want to load zabbix agent configuration file from another directory there are following options:
      1. Build Zabbix Agent from sources and define --sysconfdir as your want;
      2. You can try to change the zabbix-agent service systemd file(/usr/lib/systemd/system/zabbix-agent.service) and set another directory for configuration file.

      Please note that in some cases when you are templates with pre-defined user parameters(e.g. MySQL DB Template) then zabbix_agent also load additional configuration files. Directory for them is defined in zabbix_agentd.conf file under Option: Include.
      Thank you for your reply
      can you give me some manual about build agent from source ? We must to download from : https://www.zabbix.com/download_agents ?

      Comment

      • valentins.grins
        Member
        • Nov 2019
        • 38

        #4
        This is generic documentation for building zabbix components from source: https://www.zabbix.com/documentation...lation/install

        In your case you need to execute following:
        Code:
        ./configure --enable-agent --sysconfdir=/opt/zabbix --prefix=/usr
        make
        make install

        Comment

        • daohai
          Junior Member
          • Oct 2019
          • 28

          #5
          Thank you so much but i think it's very difficult with me .
          i try but i don't understand how to make it .

          Comment

          Working...