# How to Install Zabbix Server on a CentOS 7 Server

> URL: https://www.atlantic.net/vps-hosting/how-to-install-zabbix-server-centos-server/ | Published: 2015-08-12 | Updated: 2026-03-03 | Author: Alexander Wise

##### Verified and Tested 05/19/21

## Introduction

This how-to will show you how to install the Zabbix 5.0 Server on a CentOS 7 installation. Zabbix is an open-source monitoring tool that is ideal for monitoring your cloud servers. However, it can monitor many other types of devices. Installing Zabbix can help you find issues with your server before an outage occurs.

## Prerequisite

- A CentOS 7 server running LAMP. Please see [this post](https://www.atlantic.net/vps-hosting/how-to-install-lamp-centos-7-2/) for details on installing LAMP on CentOS 7.
- If you do not have a CentOS 7 server, try a [Virtual Private Server](https://www.atlantic.net/vps-hosting/) today!

  ![Zabbix Vision by Walker Cahall](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix1.png) Zabbix Vision by [Walker Cahall](http://www.waltronic.net/)

## Install Zabbix on CentOS 7

To install the Zabbix server, you will need to find out if your CentOS installation is 32-bit or 64-bit.

To do this run the command:

```
uname -i
```

![Install Zabbix](https://www.atlantic.net/wp-content/uploads/2018/01/Zabbix2.png)

uname -i

If it says x86_64, you are using a 64-bit installation.

![uname -a](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix3.png)

uname -a

If it says i368, you are using a 32-bit installation.

We will then need to install the Zabbix repository from Zabbix.
 For CentOS 7**64-Bit,**run the following command:

```
yum install -y centos-release-scl
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
```

After installing the Zabbix repository, you can now install the Zabbix server. Do that by running the command:

```
yum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl zabbix-server-mysql zabbix-agent --enablerepo=zabbix-frontend
```

Now, we need to make some configuration changes before going through the web installation.

Edit the Zabbix config file and set the timezone.

```
nano /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
```

Change the following line

```
php_value[date.timezone] = America/New_York:
```

Next, edit **/etc/php.ini** with your favorite editor and change the following:

Under Resource limits

```
max_execution_time = 600
```

![php.ini max_execution_time](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix4.png)

php.ini max_execution_time

```
max_input_time = 600
```

![php.ini max_input_time](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix5.png)

php.ini max_input_time

```
memory_limit= 256M
```

![php.ini memory_limit](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix6.png)

php.ini memory_limit

Under Data Handling

```
post_max_size = 32M
```

![php.ini post_max_size](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix7.png)

php.ini post_max_size

Under File Uploads

```
upload_max_filesize = 16M
```

![php.ini upload_max_filesize](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix8.png)

php.ini upload_max_filesize

Under Module Settings

```
date.timezone = 'UTC'
```

![php.ini date.timezone](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix9.png)

php.ini date.timezone

You can change this to a timezone of your choice. In this example, we are using UTC. [For a complete list of PHP timezones, go here](http://php.net/manual/en/timezones.php).

Once done with the php.ini configurations, we can set up the database.

```
mysql -u root -p
```

When prompted, enter your MySQL root password that you set up when installing MySQL.

In MySQL, enter the following commands:

```
create database zabbix character set utf8 collate utf8_bin;
```

Make sure you set your own secure password where it says [insert-password-here]

```
grant all privileges on zabbix.* to zabbix@localhost identified by '[insert-password-here]';
```

```
flush privileges;
```

```
exit
```

After creating the database, we need to add the initial Zabbix schema and data. To do that, run the following commands (for the MySQL commands, you will be prompted for the Zabbix password you set when you created the database):

```
cd /usr/share/doc/zabbix-server-mysql*/
zcat create.sql.gz | mysql -u zabbix -p zabbix
```

Once schema and data have been added to the database, we need to edit the Zabbix configuration file.
 Use a text editor to edit **/etc/zabbix/zabbix_server.conf** and make sure the following are set:

```
DBHost=localhost
DBName=zabbix 
DBUser=zabbix 
DBPassword=[insert-password-here]
```

Once the conf file is set, you can now start the Zabbix server and restart Apache.

```
systemctl start rh-php72-php-fpm
```

```
systemctl restart zabbix-server zabbix-agent httpd
```

Now, we can go to the web installation. In your browser, go to http://yourhostname-or-ipaddress/zabbix

If you are unsure what your IP address is, run the following:

```
ifconfig
```

![Sample ifconfig](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix10.png)

In our example, we would put http://192.68.0.2/zabbix in the address bar and get the following page. Click Next

![Zabbix Setup Page](https://www.atlantic.net/wp-content/uploads/2015/08/zabbix-setup.png)
 Make sure everything says OK. If not, look at your php.ini file and make the appropriate changes.

Click next if everything is OK.

![Prerequisite Check](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix12.png)

 

Input your database information that you set up earlier and click test connection.

If it says OK click next, if not check your database information again to see if it is accurate.

![Enter your database information accordingly.](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix13.png)

For most installations, you can keep the defaults. If you would like, you can set a name for the installation. Once done, click next.

![Enter your localhosts information](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix14.png)

Verify your installation and click next.

![Review your settings and select Next](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix15.png)

Click finished to go to the login page.

![Install](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix16.png)

You can then log into Zabbix with the default logins.

Username: Admin

Password: zabbix

![First Log in](https://www.atlantic.net/wp-content/uploads/2018/01/zabbix17.png)

 

Congratulations! You have now installed Zabbix on Centos 7. Thank you for following along this how to! Come back for updates, and try a [VPS Hosting](https://www.atlantic.net/vps-hosting/) solution from Atlantic.Net.
