{"id":8385,"date":"2019-01-20T10:11:42","date_gmt":"2019-01-20T10:11:42","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=8385"},"modified":"2019-03-09T03:34:02","modified_gmt":"2019-03-09T03:34:02","slug":"install-zabbix-4-0-on-ubuntu-linux-hint","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/20\/install-zabbix-4-0-on-ubuntu-linux-hint\/","title":{"rendered":"Install Zabbix 4.0 on Ubuntu \u2013 Linux Hint"},"content":{"rendered":"<p>Zabbix is an open source monitoring tool. With Zabbix, you can monitor your servers, virtual machines, networks, cloud services and many more. It is a very useful tool for small, medium and large IT organizations. In this article, I will show you how to install Zabbix on Ubuntu 18.04 LTS. So, let\u2019s get started.<\/p>\n<p>Zabbix is not available in the official package repository of Ubuntu 18.04 LTS. But, you can easily add the official pakage repository of Zabbix on Ubuntu 18.04 LTS and install Zabbix from there.<\/p>\n<p>First, navigate to the ~\/Downloads directory with the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/1-30.png\" alt=\"\" width=\"1140\" height=\"116\" \/><\/p>\n<p>Now, download the Zabbix package repository DEB file with the following command:<\/p>\n<p>$ wget https:\/\/repo.zabbix.com\/zabbix\/4.0\/ubuntu\/pool\/main\/z\/zabbix-release\/<br \/>\nzabbix-release_4.0-2+bionic_all.deb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/2-29.png\" alt=\"\" width=\"1140\" height=\"116\" \/><\/p>\n<p>The DEB package file should be downloaded.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/3-28.png\" alt=\"\" width=\"1140\" height=\"401\" \/><\/p>\n<p>As you can see, a new DEB file is downloaded in the ~\/Downloads directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/4-27.png\" alt=\"\" width=\"1140\" height=\"160\" \/><\/p>\n<p>Now, install the DEB package file with the following command:<\/p>\n<p>$ sudo dpkg -i zabbix-release*.deb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/5-27.png\" alt=\"\" width=\"1136\" height=\"91\" \/><\/p>\n<p>The Zabbix official package repository should be added.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/6-25.png\" alt=\"\" width=\"1132\" height=\"246\" \/><\/p>\n<h3>Updating APT Package Repository Cache:<\/h3>\n<p>Now, you have to update the APT package repository cache.<\/p>\n<p>To do that, run the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/7-26.png\" alt=\"\" width=\"1138\" height=\"96\" \/><\/p>\n<p>The APT package repository cache should be updated.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/8-23.png\" alt=\"\" width=\"1140\" height=\"417\" \/><\/p>\n<h3>Installing and Configuring Zabbix:<\/h3>\n<p>Now, you can install Zabbix with the following command:<\/p>\n<p>$ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/9-20.png\" alt=\"\" width=\"1140\" height=\"96\" \/><\/p>\n<p>Now, press y and then press &lt;Enter&gt;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/10-17.png\" alt=\"\" width=\"1144\" height=\"405\" \/><\/p>\n<p>Zabbix is being installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/11-16.png\" alt=\"\" width=\"1135\" height=\"418\" \/><\/p>\n<p>Zabbix is installed at this point.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/12-14.png\" alt=\"\" width=\"1139\" height=\"357\" \/><\/p>\n<p>Now, you have to create a MySQL\/MariaDB database for Zabbix.<\/p>\n<p>To do that, start MySQL\/MariaDB console as root with the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/13-14.png\" alt=\"\" width=\"1133\" height=\"96\" \/><\/p>\n<p>If you have MySQL\/MariaDB password set for the root user, then you can use the following command to login to the console as root:<\/p>\n<p>And then enter the password and you should be logged in.<\/p>\n<p>Once you\u2019re logged into the MySQL\/MariaDB console, it should look something like this.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/14-13.png\" alt=\"\" width=\"1136\" height=\"287\" \/><\/p>\n<p>Now, create a database zabbix with the following SQL command:<\/p>\n<p>MariaDB [(none)]&gt; create database zabbix character set utf8 collate utf8_bin;<\/p>\n<p>The database zabbix should be created.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/15-12.png\" alt=\"\" width=\"1132\" height=\"163\" \/><\/p>\n<p>Now, grant all privileges to the user zabbix to the database zabbix you just created and also set a password for the user zabbix with the following SQL command:<\/p>\n<p>MariaDB [(none)]&gt; grant all privileges on zabbix.* to zabbix@localhost identified by<br \/>\n&#8216;YOUR_PASSWORD_HERE&#8217;;<\/p>\n<p><u>NOTE:<\/u> Make sure to replace YOUR_PASSWORD_HERE with your desired password.<\/p>\n<p>The required permissions should be granted and the password should be set. I set the password zabbix in this article for simplicity.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/16-10.png\" alt=\"\" width=\"1140\" height=\"164\" \/><\/p>\n<p>Now, exit out of the MySQL\/MariaDB console with the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/17-11.png\" alt=\"\" width=\"1140\" height=\"80\" \/><\/p>\n<p>Now, create the required tables with the following command:<\/p>\n<p>$ zcat \/usr\/share\/doc\/zabbix-server-mysql*\/create.sql.gz | mysql -uzabbix -Dzabbix -pzabbix<\/p>\n<p><u>NOTE:<\/u> Make sure you replace the password zabbix with the password that you set.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/18-11.png\" alt=\"\" width=\"1140\" height=\"75\" \/><\/p>\n<p>Now, you have to edit the Zabbix configuration file \/etc\/zabbix\/zabbix_server.conf with the following command:<\/p>\n<p>$ sudo nano \/etc\/zabbix\/zabbix_server.conf<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/19-11.png\" alt=\"\" width=\"1140\" height=\"78\" \/><\/p>\n<p>Now, find the line DBUser=zabbix and add a new line below it as marked in the screenshot below. Once you\u2019re done, press &lt;Ctrl&gt; + x followed by y and then press &lt;Enter&gt; to save the file.<\/p>\n<p><u>NOTE:<\/u> DBPassword=zabbix, sets the database password to zabbix. Replace zabbix with the password that you set.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/20-11.png\" alt=\"\" width=\"1140\" height=\"449\" \/><\/p>\n<p>Now, you have to set the correct time zone to the PHP engine. To do that, edit the configuration file \/etc\/zabbix\/apache.conf with the following command:<\/p>\n<p>$ sudo nano \/etc\/zabbix\/apache.conf<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/21-10.png\" alt=\"\" width=\"1140\" height=\"81\" \/><\/p>\n<p>Now, scroll down a little bit and find the marked lines. Remove the hash (#) sign to uncomment them and change Europe\/Riga to your desired time zone. You can find more information on what to put there at <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_tz_database_time_zones\">https:\/\/en.wikipedia.org\/wiki\/List_of_tz_database_time_zones<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/22-9.png\" alt=\"\" width=\"1140\" height=\"539\" \/><\/p>\n<p>The final configuration file in my case looks as follows. Once you\u2019re done, press &lt;Ctrl&gt; + x followed by y and then press &lt;Enter&gt; to save the file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/23-8.png\" alt=\"\" width=\"1140\" height=\"542\" \/><\/p>\n<p>Now, restart zabbix-server, zabbix-agent and apache2 services with the following command:<\/p>\n<p>$ sudo systemctl restart zabbix-server zabbix-agent apache2<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/24-9.png\" alt=\"\" width=\"1140\" height=\"82\" \/><\/p>\n<p>Now add zabbix-server, zabbix-agent and apache2 services to the system startup of your Ubuntu 18.04 LTS machine with the following command:<\/p>\n<p>$ sudo systemctl enable zabbix-server zabbix-agent apache2<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/25-8.png\" alt=\"\" width=\"1140\" height=\"81\" \/><\/p>\n<p>zabbix-server, zabbix-agent and apache2 services should be added to the system startup and they will start automatically when your computer boots from now on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/26-8.png\" alt=\"\" width=\"1140\" height=\"217\" \/><\/p>\n<p>Now, run the following command to find the IP address of your Ubuntu 18.04 LTS machine:<\/p>\n<p>As you can see, in my case the IP address of my Ubuntu 18.04 LTS machine is 192.168.21.128. It should be different for you. So, make sure you replace it with yours from now on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/27-7.png\" alt=\"\" width=\"1130\" height=\"374\" \/><\/p>\n<p>Now, visit <a href=\"http:\/\/192.168.21.128\/zabbix\">http:\/\/192.168.21.128\/zabbix<\/a> from your favorite web browser and you should see the following page. As you\u2019re running Zabbix frontend for the first time, you have to configure the Zabbix frontend. To do that, click on Next step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/28-7.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>Now, make sure all of the pre-requisites are OK. Then, click on Next step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/29-6.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>Now, type in the password for the MySQL\/MariaDB database user zabbix (in my case it is zabbix) and click on Next step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/30-3.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>Now, click on Next step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/31-3.png\" alt=\"\" width=\"1360\" height=\"768\" \/><\/p>\n<p>Make sure all the information is correct. Then, click on Next step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/32-2.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>Zabbix should be successfully configured. Now, click on Finish.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/33-2.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>Now you should be able to login as the default user Admin with the default password zabbix.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/34-2.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>Once you log in, you should see the Zabbix dashboard. Now, you can use Zabbix as much as you want.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/35-4.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>That\u2019s how you install Zabbix on Ubuntu 18.04 LTS. Thanks for reading this article.<\/p>\n<p><a href=\"https:\/\/linuxhint.com\/install_zabbix_4_ubuntu\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix is an open source monitoring tool. With Zabbix, you can monitor your servers, virtual machines, networks, cloud services and many more. It is a very useful tool for small, medium and large IT organizations. In this article, I will show you how to install Zabbix on Ubuntu 18.04 LTS. So, let\u2019s get started. Zabbix &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/20\/install-zabbix-4-0-on-ubuntu-linux-hint\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Zabbix 4.0 on Ubuntu \u2013 Linux Hint&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8385","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=8385"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8385\/revisions"}],"predecessor-version":[{"id":10887,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8385\/revisions\/10887"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=8385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=8385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=8385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}