In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "the tutorial of installing zabbix3.0.28 under lnmp1.6". In the daily operation, I believe that many people have doubts about the tutorial of installing zabbix3.0.28 under lnmp1.6. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "the tutorial of installing zabbix3.0.28 under lnmp1.6". Next, please follow the editor to study!
1. Configure the firewall
[root~] # firewall-cmd-- permanent-- zone=public-- add-service=http # Open http port [root~] # firewall-cmd-- reload # refresh policy
2. Disable selinux
[root~] # vi / etc/selinux/config # SELINUX=enforcing # comment out # SELINUXTYPE=targeted # comment out SELINUX=disabled # add [root~] # setenforce 0 # configuration effective immediately
3. Install LNMP1.6
[root~] # yum install screen # install screen (interrupt runnable screen-r reconnection) [root~] # screen-S lnmp # create a lnmp job [root~] # wget http://soft.vpser.net/lnmp/lnmp1.6.tar.gz-cO lnmp1.6.tar.gz & & tar zxf lnmp1.6.tar.gz & cd lnmp1.6 &. / install.sh lnmp # download, Unpack and install LNMP Please setup root password of MySQL. (default password:root) # set Mysql password Do you want to enable or disable the InnoDB storage Engine? # whether to enable InnoDB engine You have 5 options for your database install. # choose to install the database version You have 6 options for your PHP install. # choose to install PHP version (zabbix3.0 above) You have 3 options for your Memory Allocator install. # Select memory optimization (default: none) display after installation: Nginex:OK,Mysql:OK,PHP:OK
4. Install and configure zabbix
Download address https://www.zabbix.com/cn/download_sources#tab:30LTS
Zabbix-3.0.28.tar.gz https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.28/zabbix-3.0.28.tar.gz
[root~] # yum install mysql-devel net-snmp-devel curl curl-devel-y # install zabbix related environment first install a dependency Otherwise, the compilation will appear configure: error: MySQL library not found [root~] # mkdir-p / home/soft [root~] # wget-c https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.28/zabbix-3.0.28.tar.gz # download zabbix (parameter:-c interrupt reconnection) [root~] # tar-xf zabbix-3.0.28.tar.gz [root~] # groupadd zabbix # build user group [root~] # useradd-g zabbix zabbix # build user [root~] # ln-s / usr/local/lib/libiconv.so.2 / usr/lib/libiconv. So.2 # add soft connection [root~] # / sbin/ldconfig # effective immediately [root~] # cd zabbix-3.0.28 [root~] #. / configure-- prefix=/usr/local/zabbix-- enable-server-- enable-agent- -with-mysql=/usr/local/mysql/bin/mysql_config-- enable-ipv6-- with-net-snmp-- with-libcurl-- with-libxml2 # compile [root~] # make & & make install [root~] # ln-s / usr/local/zabbix/sbin/* / usr/local/sbin/ # add system softlink [root~] # ln-s / Usr/local/zabbix/bin/* / usr/local/bin/ # add system softlink compilation parameters description-prefix=/usr/local/zabbix to specify installation directory / usr/local/zabbix-enable-server to install zabbix server programs-enable-agent to install agent programs-with-mysql to specify mysql_config configuration file directory for using mysql database -enable-ipv6 for enabling ipv6 support-with-net-snmp for enabling snmp support-with-libcurl compiling xml modules for enabling curl-with-libxml2 Mainly used to monitor vm virtual machines
Compile and install zabbix error: MySQL library not found
# find /-name "mysql_config*" / usr/local/mysql/bin/mysql_config change-- with-mysql to-- with-mysql=/usr/local/mysql/bin/mysql_config
Add the port corresponding to zabbix service
[root~] # vi / etc/services # edit, and add the following code # Zabbix zabbix-agent 10050/tcp # Zabbix Agentzabbix-agent 10050/udp # Zabbix Agentzabbix-trapper 10051/tcp # Zabbix Trapperzabbix-trapper 10051/udp # Zabbix Trapper at the end
Modify zabbix configuration file to configure zabbix_server
Cd / usr/local/zabbix/etc vim / usr/local/zabbix/etc/zabbix_server.conf DBName=zabbix # Database name 86DBUser=zabbix # Database username 102DBPassword=123456 # Database password 110ListenIP=localhost # Database ip address 296AlertScriptsPath=/usr/local/zabbix/share/zabbix/alertscripts # zabbix run script directory 445
7. Configure agent
Vim / usr/local/zabbix/etc/zabbix_agentd.conf Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/ # 264UnsafeUserParameters=1 # enable Custom key 279If you want to modify other configurations, please refer to http://www.xiaohuai.com/4028
8. Add a boot script
Cp / home/soft/zabbix-3.0.28/misc/init.d/fedora/core/zabbix_server / etc/rc.d/init.d/zabbix_server # Server cp / home/soft/zabbix-3.0.28/misc/init.d/fedora/core/zabbix_agentd / etc/rc.d/init.d/zabbix_agentd # client chmod + x / etc/rc.d/init.d/zabbix_server # add script execution permission chmod + x / etc/ Rc.d/init.d/zabbix_agentd # add script execution permission chkconfig zabbix_server on # add boot boot chkconfig zabbix_agentd on # add boot boot if / etc/init.d/ has this script, you don't have to copy it If not, you can copy another copy to the startup directory to facilitate operations such as restart and stop. Cp / home/soft/zabbix-3.0.28/misc/init.d/fedora/core/zabbix_server / etc/init.d/zabbix_server # Server cp / home/soft/zabbix-3.0.28/misc/init.d/fedora/core/zabbix_agentd / etc/init.d/zabbix_agentd # client chmod + x / etc/init.d/zabbix_server # add script execution permissions chmod + x / etc/init.d/zabbix_agentd # add script execution permissions
9. Modify the zabbix_server zabbix_agentd file in the boot directory and boot directory
Vim / etc/rc.d/init.d/zabbix_server # Edit server configuration file BASEDIR=/usr/local/zabbix/ # zabbix installation directory 22vim / etc/rc.d/init.d/zabbix_agentd # Edit client configuration file BASEDIR=/usr/local/zabbix/ # zabbix installation directory / etc/init.d/ make the same modification. Check it.
10. Set up zabbix database and import data file
Cd / home/soft/zabbix-3.0.28/database/mysqlmysql-u root-p # enter the password, enter the MySQL console create database zabbix character set utf8; # to create the database zabbix, and the database code uses utf8 GRANT USAGE ON *. * TO 'user01'@'localhost' IDENTIFIED BY' 123456' WITH GRANT OPTION; # to create a new account zabbix, password 123456 flush privileges; # refresh the system authorization table grant all on zabbix.* to 'zabbix'@'localhost' identified by' 123456' with grant option again # allow account zabbix to connect locally to database zabbix flush privileges # refresh the system authorization table use zabbix # enter the database and refresh the database Be sure to import script files to zabbix database source / home/soft/zabbix-3.0.0alpha2/database/mysql/schema.sql # import script files to zabbix database source / home/soft/zabbix-3.0.0alpha2/database/mysql/data.sql # import script files to zabbix database in the order of sql files
Configure the web site
Mkdir / home/wwwroot/zabbixcd / home/soft/zabbix-3.0.28/frontends/\ cp-rf php/* / home/wwwroot/zabbix/ #\ does not prompt to overwrite chown-R www.www / home/wwwroot/zabbix# and add nginx configuration # lnmp vhost addPlease enter domain (example: www.lnmp.org): zb.torvalds.cn Your domain: zb.torvalds.cnEnter more domain name (example: lnmp.org * .lnmp.org): n domain list: nPlease enter the directory for the domain: Domain name Default directory: / home/wwwroot/zb.torvalds.cn: / home/wwwroot/zabbix Virtual Host Directory: / home/wwwroot/zabbixAllow Rewrite rule? (YBO) nYou choose rewrite: noneEnable PHP Pathinfo? (YBO) yEnable pathinfo.Allow access log? (YBO) Disable access log.Multiple PHP version found, Please select the PHP version.1: Default Main PHP 7.0.336: PHP 5.6[ found] 8: PHP 7.1[ found] Enter your choice (1,2,3,4,5,6,7,8 or 9): Default,Current selection: PHP 7.0.33Create database and MySQL user with same name (YPo) nCreate ftp account (YZO) nAdd SSL Certificate (yPo) n
Start installing the web site
1. Enter the configured domain name after browsing:
Resolve the errors in the diagram
Cp / usr/local/php/etc/php.ini / usr/local/php/etc/php.ini.backvim / usr/local/php/etc/php.ini# modify memory_limit = 128Mmax_input_time = 300 # 378disable_functions = # this paragraph can be changed to this, or you can simply remove "scandir," and execute the restart php script. # / etc/init.d/php-fpm restart
PHP ldap Warning https://www.cnblogs.com/bigdevilking/p/9440098.html when Zabix is installed
First, if it is compiled by source code
[root ~] # ls / usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/opcache.an opcache.so# alarms occur because the ldap module does not exist and needs to be compiled and reloaded
Go to the decompressed directory of the source code package, and if the source code file is not saved, download the same version of php to decompress it, and compile the ldap module with the source code (the same method is used if other modules are missing)
Cd / www/lnmp1.6/srctar-jxvf php-7.0.33.tar.bz2cd / www/lnmp1.6/src/php-7.0.33/ext/ldap [root~ ldap] # lsconfig.m4 config.w32 CREDITS ldap.c ldap.mak LDAP_Win32_HOWTO.txt php_ldap.h tests [root~ ldap] # phpize # tool for compiling PHP extensions It mainly generates the corresponding configure file based on the system information or directly executes the compilation according to its own directory / usr/local/php7.1/bin/phpizeConfiguring for:PHP Api Version: 20170718Zend Module Api No: 20170718Zend Extension Api No: 320170718 [root~ ldap] #. / configure-- with-php-config=/usr/local/php7.1/bin/php-config-- with-ldap & & make & & make install # configuration Translation and installation # error report Cannot find ldap libraries in/ usr/libconfigure: error: Cannot find ldap libraries in/ usr/lib solution: cp-frp / usr/lib64/libldap* / usr/lib/ https://www.cnblogs.com/lwops/p/10077467.htmlmake & make install# add extension=ldap.sovim / usr/local/php7.1/etc/php.iniextension=ldap.so # 9errors / usr/local/php7.1/bin/php-m to the end of the php.ini file in php
1. Find the ldap module file in the PHP source package
Cd / www/lnmp1.6/src
Tar-jxvf php-7.0.33.tar.bz2
Cd / www/lnmp1.6/src/php-7.0.33/ext/ldap
Https://www.cnblogs.com/alonones/p/6103090.html
Https://www.cnblogs.com/zhangzeyu/p/6438534.html
At this point, the study of "the tutorial of installing zabbix3.0.28 under lnmp1.6" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.