1 2 3 4 5 |
// sudo apt update sudo apt install apache2 libapache2-mod-php sudo apt install mysql-server sudo apt install php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql |
xxx
1 2 |
// sudo mysql_secure_installation |
xxx
1 2 3 4 5 6 7 8 9 10 |
// vim /etc/php/7.4/apache2/php.ini memory_limit = 256M upload_max_filesize = 16M post_max_size = 16M max_execution_time = 300 max_input_time = 300 max_input_vars = 10000 date.timezone = 'Europe/Prague' |
xxx
1 2 3 |
// wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb sudo dpkg -i zabbix-release_5.0-1+focal_all.deb |
xxx
1 2 3 |
// sudo apt update sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent zabbix-apache-conf |
xxx
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// mysql -u root -p CREATE DATABASE zabbixdb character set utf8 collate utf8_bin; CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON zabbixdb.* TO 'zabbix'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT; // // After creating the database, load the default schema of Zabbix of database. // cd /usr/share/doc/zabbix-server-mysql zcat create.sql.gz | mysql -u zabbix -p zabbixdb |
xxx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// sudo vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbixdb DBUser=zabbix DBPassword=password // // Now, enable the Zabbix serivce to start on system boot and restart service to reload new settings. // sudo systemctl enable zabbix-server sudo systemctl restart zabbix-server // The Zabbix packages also creates its own Apache configuration file ie /etc/zabbix/apache.conf and make a link to Apache configuration directory. Let’s use the following command to restart Apache service. // sudo systemctl restart apache2 |
Configure and Test Zabbix Agent in Linux:
1 2 |
// sudo dpkg --get-selections | grep ufw |