On the test, I installed Zabbix 3.4 in Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Ubuntu 18.04 LTS.
Links to other versions of Zabbix can be found on the official website www.zabbix.com or http://repo.zabbix.com/zabbix/.
For example, Zabbix 3.4 for Ubuntu is located here http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/.
After installing Zabbix, transferred the data from the old Zabbix 2.2 server to it, simply exporting the templates first, then network nodes, set cards and complex screens.
Let’s proceed to installation, add the official source of packages to the system (example for Ubuntu 14.04 LTS (trusty)):
wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+trusty_all.deb
sudo dpkg -i zabbix-release_3.4-1+trusty_all.deb
sudo apt update
For Ubuntu 16.04 LTS (xenial):
wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
sudo dpkg -i zabbix-release_3.4-1+xenial_all.deb
sudo apt update
For Ubuntu 18.04 (Bionic Beaver):
wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+bionic_all.deb
sudo dpkg -i zabbix-release_3.4-1+bionic_all.deb
sudo apt-get update
Perform the installation of Zabbix:
sudo apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-agent
Connect to the MySQL server and create a database:
mysql -uroot -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'ПАРОЛЬ';
quit;
We import the standard data into the created database:
cd /usr/share/doc/zabbix-server-mysql
zcat create.sql.gz | mysql -uroot -p zabbix
For example, open the Zabbix server configuration file in the nano text editor (in nano, press Ctrl+X to exit, y/n to save or cancel changes):
sudo nano /etc/zabbix/zabbix_server.conf
Specify the MySQL database name, user name and password:
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=PASSWORD
Run the Zabbix server process:
sudo service zabbix-server start
You need to fix the PHP configuration for Zabbix. The Apache configuration file for the Zabbix web interface is located in /etc/apache2/conf.d/zabbix or /etc/apache2/conf-enabled/zabbix.conf. Some minimal PHP configuration parameters have already been set there:
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Europe/Kiev
Restart the web server to apply the changes:
sudo service apache2 restart
sudo service zabbix-server restart
Make sure that the Zabbix agent and the Zabbix server are started at system startup and, if necessary, enable:
sudo systemctl is-enabled zabbix-agent.service
sudo systemctl is-enabled zabbix-server.service
sudo systemctl enable zabbix-agent.service
sudo systemctl enable zabbix-server.service
The Zabbix web interface is available through a browser at http://HOST/zabbix.
By default, the user name for logging in through the web interface is admin or Admin, the password is zabbix.
See also:
Installing and Configuring Zabbix Agent in Ubuntu