@samara To install Zabbix on Ubuntu run the following commands in the terminal:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# Update the packages on Ubuntu sudo apt-get update # Install the packages that are necessary for the installation of zabbix sudo apt-get install apache2 mariadb-server libapache2-mod-php7.4 php7.4-cli php7.4-mysql php7.4-gd php7.4-xml php7.4-bcmath # Create the zabbix database and user sudo mysql -u root -p # Run SQL Queries. CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost'; FLUSH PRIVILEGES; EXIT; # Download the latest version of Zabbix server cd /tmp wget https://repo.zabbix.com/zabbix/5.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.2-1+focal_all.deb # Install the zabbix packages that were downloaded sudo apt install ./zabbix-release_5.2-1+focal_all.deb sudo apt update sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent # Import the initial schema and data to the MySQL database zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix # Configure the "zabbix_server.conf" sudo nano /etc/zabbix/zabbix_server.conf # Update with DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password |
@samara
sudo nano /etc/zabbix/apache.conf
php_value date.timezone Europe/Paris
sudo systemctl restart apache2
sudo systemctl start zabbix-server sudo systemctl enable zabbix-server sudo systemctl start zabbix-agent sudo systemctl enable zabbix-agent
You can now open your web browser and access the Zabbix web interface by entering the following URL:
http://your_server_ip/zabbix
Follow the on-screen instructions to complete the installation and setup of Zabbix.
That's it! You have successfully installed Zabbix on Ubuntu.