In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Zabbix 3.2.11
Close selinux
[root@vm4 ~] $vi / etc/selinux/config
SELINUX=disabled
1. Install lamp
[root@vm4 ~] $yum install-y mariadb
[root@vm4 ~] $rpm-qa | grep mariadb
[root@vm4 ~] $yum install-y php-mysql
[root@vm4 ~] $yum install-y httpd
[root@vm4 ~] $systemctl enable mariadb
[root@vm4 ~] $systemctl start mariadb
[root@vm4 ~] $mysql_secure_installation-> initialize mysql
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
Password for the root user. If you've just installed MariaDB, and
You haven't set the root password yet, the password will be blank
So you should just press enter here.
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
Root user without the proper authorisation.
You already have a root password set, so you can safely answer'nails.
Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
Remove anonymous users? [Y/n] y
... Success!
Disallow root login remotely? [Y/n] y
... Success!
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
... Success!
Thanks for using MariaDB!
[root@vm4 ~] $mysql-uroot-pmysql
Welcome to the MariaDB monitor. Commands end with; or\ g.
Your MariaDB connection id is 11
Server version: 5.5.52-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
MariaDB [(none)] > create user 'zabbix'@'%' identified by' zabbix'
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)] > create database zabbix
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)] > grant all privileges on zabbix.* to 'zabbix'@'%'
Query OK, 0 rows affected (0.00 sec)
[root@vm4 ~] $systemctl enable httpd
[root@vm4 ~] $systemctl start httpd
[root@vm4] $firewall-cmd-- permanent-- zone=public-- add-service=http
Success
[root@vm4] $firewall-cmd-- reload
Success
Now you can open the http://vm4 web page on IE,firefox.
2.zabbix source code installation
[root@vm4 / opt/u1] $tar-xvf zabbix-3.2.11.tar.gz
[root@vm4 / opt/u1] $cd zabbix-3.2.11/
[root@vm4 / opt/u1/zabbix-3.2.11] $. / configure-prefix=/usr/local/zabbix-enable-server-enable-agent-with-mysql-enable-ipv6-with-net-snmp-with-libcurl-with-libxml2
Will prompt
...
Configure: error: MySQL library not found
[root@vm4 / opt/u1/zabbix-3.2.11] $yum install mysql-devel
Execute the. / configure command again, prompt
Configure: error: LIBXML2 library not found
[root@vm4 / opt/u1/zabbix-3.2.11] $yum install-y libxml2-devel
Execute the. / configure command again, and the prompt is as follows, how do you report so many errors?
Configure: error: Invalid Net-SNMP directory-unable to find net-snmp-config
[root@vm4 / opt/u1/zabbix-3.2.11] $yum install-y net-snmp-devel
Execute the. / configure command again, prompt
Configure: error: Curl library not found
[root@vm4 / opt/u1/zabbix-3.2.11] $yum install-y curl-devel
Execute .configure, and finally succeed
[root@vm4 / opt/u1/zabbix-3.2.11] $make
[root@vm4 / opt/u1/zabbix-3.2.11] $make install
3. Import zabbix database structure.
[root@vm4 / opt/u1/zabbix-3.2.11/database/mysql] $cat schema.sql | mysql-uzabbix-pzabbix zabbix
[root@vm4 / opt/u1/zabbix-3.2.11/database/mysql] $cat images.sql | mysql-uzabbix-pzabbix zabbix
[root@vm4 / opt/u1/zabbix-3.2.11/database/mysql] $cat data.sql | mysql-uzabbix-pzabbix zabbix
4. Configure Zabbix server parameters
[root@vm4 ~] $more / etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
LogSlowQueries=3000
5. Modify zabbix_agentd.conf
[root@vm4 / usr/local/zabbix/etc] $more zabbix_agentd.conf
LogFile=/tmp/zabbix_agentd.log
Server=127.0.0.1 # # ip on the agent side
ServerActive=127.0.0.1
Hostname=vm4 # # hostname with zabbix installed
[root@vm4 / usr/local/zabbix/etc] $/ usr/local/zabbix/sbin/zabbix_agentd
Zabbix_agentd [27401]: user zabbix does not exist
Zabbix_agentd [27401]: cannot run as root!
[root@vm4 / usr/local/zabbix/etc] $
[root@vm4 / usr/local/zabbix/etc] $useradd zabbix
[root@vm4 / usr/local/zabbix/etc] $/ usr/local/zabbix/sbin/zabbix_agentd
6. Modify PHP settin
Vi / etc/php.ini-> add the following
Max_execution_time = 600,
Max_input_time = 600,
Memory_limit = 256m
Post_max_size = 32m
Upload_max_filesize = 16m
Date.timezone = Asia/Shanghai
Extension=bcmath.so
Always_populate_raw_post_data = 1
7. Add the PHP file of Zabbix to Apache
[root@vm4 / opt/u1/zabbix-3.2.11] $cp-r. / frontends/php/ / var/www/html/zabbix
[root@vm4 / opt/u1/zabbix-3.2.11] $systemctl restart httpd
8. Open zabbix through IE and configure zabbix
The ip of http://192.168.32.10/zabbix/setup.php-- > vm4 is 192.168.32.10
[root@vm4 ~] $yum install php-xml
When you next the page, you keep reporting errors.
= php installed by default is version 5.4, and a higher version 5.6 is required
Http://cn2.php.net/distributions/php-5.6.0.tar.xz-> connection
[root@vm4 / opt/u1] $tar-xvf php-5.6.0.tar.xz
[root@vm4 / opt/u1] $cd php-5.6.0/
[root@vm4 / opt/u1/php-5.6.0] $. / configure-- prefix=/usr/local/php5.6-- with-apxs2=/usr/bin/apxs-- enable-bcmath-- enable-sockets-- with-libxml-dir-- with-zlib--with-curl-- with-gd-- with-jpeg-dir-- with-png-dir-with-zlib-dir-- with-freetype-dir-- with-gettext-enable-mbstring-- with-mcrypt-- With-mysql=/usr-with-pdo-mysql=/usr/bin/mysql_config-with-mysqli=/usr/bin/mysql_config-enable-zip-with-bz2-enable-soap-with-pear-with-pcre-dir-with-openssl-with-config-file-path=/usr/local/php5.6/etc-enable-shmop-enable-intl
Configure: error: Please reinstall the BZip2 distribution
[root@vm4 / opt/u1/php-5.6.0] $yum install bzip2-devel
Execute the. / configure command again.
Configure: error: jpeglib.h not found.
[root@vm4 / opt/u1/php-5.6.0] $yum install libjpeg-devel
Configure: error: png.h not found.
[root@vm4 / opt/u1/php-5.6.0] $yum install libpng-devel
Configure: error: freetype-config not found.
[root@vm4 / opt/u1/php-5.6.0] $yum install freetype-devel
Configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
[root@vm4 / opt/u1/php-5.6.0] $yum install libicu-devel
Configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
[root@vm4 / opt/u1] $tar zxf libmcrypt-2.5.7.tar.gz
[root@vm4 / opt/u1] $cd libmcrypt-2.5.7
[root@vm4 / opt/u1/libmcrypt-2.5.7] $. / configure
[root@vm4 / opt/u1/libmcrypt-2.5.7] $make & & make install
Configure: error: Cannot find libmysqlclient under / usr.
[root@vm4 / opt/u1/php-5.6.0] $ln-s / usr/lib64/mysql/libmysqlclient.so.18.0.0 / usr/lib/libmysqlclient.so
It finally succeeded. You can make,make install.
[root@vm4 / opt/u1/php-5.6.0] $make & & make install
PHP option "always_populate_raw_post_data" must be set to "- 1" is similar to this kind of error report.
[root@vm4 / etc/httpd/conf.d] $vi php.conf-- > add the following.
Php_value date.timezone Asia/Shanghai
Php_value max_execution_time 300
Php_value post_max_size 16M
Php_value always_populate_raw_post_data-1
Unable to create the configuration file. -- > this error will occur in the last step. You need to create a zabbix.conf.php file in / var/www/html/zabbix/conf and add the following.
The permission of zabbix.conf.php is granted to 777.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.