# Install Zabbix Agent with only one command via Terminal

Using the following command to install Zabbix Agent on Centos 7 - x86\_64

Remember replace `192.168.10.1` with your Zabbix server. The script automatically create file config with Hostname get from command `hostname` on server

**#For Centos 7**

`rpm -ivh` [`https://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm`](https://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm)

`yum install zabbix-agent -y`

`cat >/etc/zabbix/zabbix_agentd.conf <<EOL PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=0 Server=192.168.10.1 ServerActive=192.168.10.1 Hostname=hostname Include=/etc/zabbix/zabbix_agentd.d/ EOL`

`chkconfig zabbix-agent on`&#x20;

`service zabbix-agent restart`
