Zabbix installation for CentOS 7

CentOS 7 Zabbix installation guide with mysql database.

Install mariadb for backend database

yum install mariadb mariadb-server

Add the zabbix repo:

rpm -i

install zabbix server with web and agent.

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

Start and enable mariadb

systemctl start mariadb
systemctl enable mariadb

Run the mysql_secure_installation script


After a clean installation the root password is empty so just press enter when asked for mariadb root password. After creating a password for mariadb root you should be fine by using the default choices.

Start mysql client and run the mysql commands

mysql -u root -p
MariaDB> create database zabbix character set utf8 collate utf8_bin;
MariaDB> grant all privileges on zabbix.* to zabbix@localhost identified by 'yourpasswordhere';

Exit out of mysql client, run the following command, and input the password you chose in the previous command.

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

Edit /etc/zabbix/zabbix_server.conf and add your database password to the DBPassword field


Start all zabbix processes and enable them on startup.

systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd

On my first test selinux made zabbix-server fail with last error in logs being”cannot disable core dump, exiting…”. I made selinux permissive for now to continue.

Add your timezone to /etc/httpd/conf.d/zabbix.conf by uncommenting the following line and replacing it with your timezone.

# php_value date.timezone Europe/Helsinki

You can then follow zabbix quickstart guide since zabbix should be properly up and running on http://zabbixServerIP/zabbix

Ansible configuration management, deploying web servers with ease

Create a basic nginx web server on centos and document the configurations to an ansible playbook yaml file

I fired up one of my OVF templates on my vcenter server and setup the IP using DHCP. I logged into the virtual machine which already had sshd running and most essential packages installed.

The OVF template had created a user with sudo rights already so that’s the first thing I needed to document on the playbook file.

I added the following lines to my main.yml file.

– name: Create user eero
user: name=eero shell=/bin/bash groups=wheel append=yes

Continue reading “Ansible configuration management, deploying web servers with ease”