Zabbix monitoring alarm server and agent installation

      In order to understand the configuration function of the zabbix background management portal, I built a zabbix environment myself, and now the process is completely recorded (deployment environment: ubuntu16.04 64-bit system version):

1. First, go to the official website to download the installation version suitable for your platform (https://www.zabbix.com/download?zabbix=3.4&os_distribution=ubuntu&os_version=xenial&db=MySQL), the latest version is zabbix3.4;
2. Use the wget tool to download the deb package file and install it
# wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
# dpkg -i zabbix-release_3.4-1+xenial_all.deb
Occasionally encounter dpkg status database is locked by another process error here, indicating that the package manager was not shut down properly. You need to restart the computer or reopen the terminal and enter the following commands to resolve the lockup, and then reinstall the package.
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
# apt update ## Check installed packages for available updates, give aggregate reports, do not actually update
3. Install zabbix server, agent agent and php page front end
# apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent ##The mysql database is installed by default here
4. Create a zabbix database and create a corresponding zabbix database user
# mysql -uroot -p
# password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
5. Initialize the database schema structure and initial data
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
6. Zabbix server information configuration (database connection information)
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password
7. The server process is started and configured to start automatically with the system
# service zabbix-server start
# update-rc.d zabbix-server enable
# service zabbix-agent start ##agent agent start, generally installed on the monitored server
8. service apache2 restart ##Restart apache http service
9. Modify zabbix front-end php and apache configuration files: vi /etc/apache2/conf-enabled/zabbix.conf
The specific modifications are as follows:
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 Asia/Shanghai ##Set the time zone in China
10. Visit http://localhost/zabbix and continue to complete the web front-end page installation steps;
11. The follow-up is relatively simple. Stop writing here. You can refer to the official website of zabbix: https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/debian_ubuntu

12. Since the installation method of the official website deployment package introduces mysql support, but the mysql database type cannot be selected during the installation process of the WEB interface, there is a missing module for installing the interaction between php and mysql database. Select to mysql database type: apt-get install php-mysql
1. First, go to the official website to download the installation version suitable for your platform (https://www.zabbix.com/download?zabbix=3.4&os_distribution=ubuntu&os_version=xenial&db=MySQL), the latest version is zabbix3.4; 2. Use the wget tool Download the deb package file and install # wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb # dpkg -i zabbix-release_3.4-1+xenial_all.deb Occasionally encounter dpkg status database is locked by another process error here, indicating that the package manager was not shut down properly. You need to restart the computer or reopen the terminal and enter the following commands to resolve the lockup, and then reinstall the package.
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
sudo rm /var/lib/dpkg/lock sudo dpkg --configure -a # apt update ##Check whether there are available updates for the installed packages, give a summary report, do not actually update 3. Install the zabbix server, the agent agent and the front end of the php page # apt install zabbix-server-mysql zabbix-frontend -php zabbix-agent ##The mysql database is installed by default here 4. Create the zabbix database and create the corresponding zabbix database user# mysql -uroot -p # password mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password'; mysql> quit; 5. Initialize database schema structure and initial data# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix 6. Zabbix server information configuration (database connection information) # vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password 7. Start the server process and configure it to follow System self-start # service zabbix-server start # update-rc.d zabbix-server enable # service zabbix-agent start ##agent agent start, generally installed on the monitored server8, service apache2 restart ##Restart apache http service9, Modify the zabbix front-end php, apache configuration files:vi /etc/apache2/conf-enabled/zabbix.conf The specific modifications are as follows:
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 Asia/Shanghai ##Set the time zone in China
10. Visit http://localhost/zabbix and continue to complete the web front-end page installation steps;
11. The follow-up is relatively simple. Stop writing here. You can refer to the official website of zabbix: https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/debian_ubuntu

12. Since the installation method of the official website deployment package introduces mysql support, but the mysql database type cannot be selected during the installation process of the WEB interface, there is a missing module for installing the interaction between php and mysql database. Select to mysql database type: apt-get install php-mysql

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326073021&siteId=291194637