Install Zabbix 6.4 On Ubuntu Server 22.04.1 In Under 10 Minutes

This guide will assume you have a working Ubuntu Server already installed with SSH enabled and ready to go. If you need help with installing Ubuntu server, refer here

If you’re more visual and prefer to watch an installation walk through, refer here

Aside from that, lets jump straight into installing Zabbix 6.4 PRE-RELEASE on top of Ubuntu Server 22.04.1 which as  the time of this writing, is latest and greatest versions of both ->

1. Install ubuntu server 22.04.1 and enable ssh

2. SSH to your Ubuntu server to run install commands

3. Install and configure Zabbix for your platform

Run the following cmds:

sudo wget https://repo.zabbix.com/zabbix/6.3/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.3-3%2Bubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.3-3+ubuntu22.04_all.deb
sudo apt update 
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

4. Install sql server

sudo apt-get install mysql-server
sudo systemctl start mysql

5. Create initial database

sudo mysql
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;

6. On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

7. Disable log_bin_trust_function_creators option after importing database schema.

sudo mysql
set global log_bin_trust_function_creators = 0;
quit;

8. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf and set the DB password with ->

sudo vim /etc/zabbix/zabbix_server.conf

9. Start Zabbix server and agent processes

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

10. Open Zabbix UI web page and proceed with web ui config (should be self explanatory)

The default URL for Zabbix UI when using Apache web server is http://host/zabbix

Video walk through ->

Questions, comments, concerns? Feel free to contact us @ [email protected] Always glad to help.

 

 

Set Up Your Own Internally Hosted Private Wiki On Ubuntu Server

We used DokuWiki to create and host our own internal Wiki on the latest version of Ubuntu Server (22.04.1 at the time of this writing). How cool is this? We’ll, it’s actually more than just ‘cool’ and can make for an invaluable tool used to centrally store crucial information while making it conveniently accessible to you and your teams.

If you’re new to DokuWiki and unfamiliar with PHP, installation and setup can be a daunting task. But not to worry because today we are going to fly you through installation step by step and as a bonus, show you the basics to get your Wiki up and running in no time.

From the horses mouth ->

DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn’t require a database. It is loved by users for its clean and readable syntax. The ease of maintenance, backup and integration makes it an administrator’s favorite. Built in access controls and authentication connectors make DokuWiki especially useful in the enterprise context and the large number of plugins contributed by its vibrant community allow for a broad range of use cases beyond a traditional wiki.

Full list of installation commands ->

1 – Update System
sudo apt-get update

2 – Install Apache And PHP
sudo apt-get install apache2 php php-gd php-xml php-json -y

3 – Start Apache Service
systemctl start apache2
systemctl enable apache2

4 – Install DokuWiki
cd /var/www
sudo wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
sudo tar xvf dokuwiki-stable.tgz
sudo mv dokuwiki-*/ dokuwiki

5 – Change Permissions
sudo chown -R www-data:www-data /var/www/dokuwiki

6 – Change Document Root In Apache To Point To /var/www/dokuwiki
sudo vim /etc/apache2/sites-enabled/000*.conf

Replace
DocumentRoot /var/www/html
with
DocumentRoot /var/www/dokuwiki

7 – Change AllowOverrides Setting In Apache2 To Use .htaccess files For Security
sudo vim /etc/apache2/apache2.conf

For directory /var/www/ replace
AllowOverride None
with
AllowOverride All

8 – Restart Apache2 Service
sudo service apache2 restart

9 – Visit http://IP-address-of-your-server/install.php to initially configure your DokuWiki.

10 – Delete The Install.php File After Finished Installing
sudo rm /var/www/dokuwiki/install.php

 

 

How To Install Zabbix 6.0 On Ubuntu Server 20.04

Can definitely be a tricky process, especially if Zabbix is new to you. What can I say about Zabbix? Well, a fantastic free monitoring software. Monitor all sorts of parameters on your servers, firewalls (works great with pfsense, hehe), etc and receive email alerts automatically if a problem is detected. Love pulling and tracking data on your system(s) performance? Zabbix will spit out all kinds of graphs and data at you and provide a birds eye view of monitoring system parameters (i.e cpu usage, ram utilization, etc) over time, which can be essential in troubleshooting. I am actually quite new to Zabbix myself and besides the tricky somewhat complex initial setup, loving it so far. We’ll today, I’m here to help you sort through any challenges getting Zabbix 6.0 going on Ubuntu Server 20.04. In fact, I am going to cover how to install both.

First we need to install Ubuntu Server 20.04 LTS

Download the iso from here -> https://ubuntu.com/download/server

In my case, I will be installing this on a VM using Hyper V.

  • configure your virtual machine software to boot from the iso you just downloaded
  • proceed with installing Ubuntu  Server 20.04 LTS. Yes this is a headless (no gui) install in my example which is fine because if the server is literally just running Zabbix, no real need for a GUI

(reference the beginning of video for more details on installing Ubuntu Server)

Installing Zabbix

Now that we have our nifty fresh and clean Ubuntu Server all installed and up and running, it’s time to install Zabbix.

1 ssh to your new Ubuntu Server and prepare to run linux commands the rest of the way to install Zabbix

2 Install Zabbix repositories

sudo wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
sudo dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
sudo apt update 

NOTE –  as in my case, this may not install correctly for you. This was due to a certificate error. You will need to comment out: mozilla/DST_Root_CA_X3.crt

located in /etc/ca-certifiates.conf. Skip to 9:10 in the video for details.

3 Install Zabbix server, frontend, agent

 sudo apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

4 install sql server

sudo apt-get install mysql-server
sudo systemctl start mysql-server

5 Create database for Zabbix

sudo mysql
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password'; 

Note – put your own password in between those quotes

grant all privileges on zabbix.* to zabbix@localhost;
quit;

6 import initial schema and data
You will be prompted to enter your newly created password.

zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

When running the above zcat command, you will be asked for the db password you created in step 5

NOTE – importing the schema data make take some time to complete and can be confusing as to if it’s actually working or hung. In one case i’ve even seen this take hours, but I just let it run and went to bed. Got up in the morning and it was successful. Not sure what the unique problem was there in that case but I digress. Usually it shouldn’t take more then 5 min max though.There is no confirmation that it completes but be patient and what you want to look for is for the system to return you to the command prompt. That is a sign it completed successfully. Skip to 12:55 in the video for details on this.

7 Configure the database for Zabbix server

(you need to specify the DB password in zabbix_server.conf file)

Edit file located here: /etc/zabbix/zabbix_server.conf
I use VIM to edit files = # sudo vim /etc/zabbix/zabbix_server.conf

Find and uncomment/edit the following line

DBPassword=password <---change to your db password you set in step 5 
8 Start Zabbix server and agent processes

Start Zabbix server and agent processes and make it start at system boot.

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2
9 Configure Zabbix frontend

Connect to your newly installed Zabbix frontend: http://server_ip_or_name/zabbix
Straight forward here but skip to 15:50 in the video for details

If you need help or have any questions at all, feel free to contact me. Hey that’s what I’m here for. I do this!