In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First, the experimental environment:
[root@zabbixserver ~] # cat / etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@zabbixserver ~] # uname-r3.10.0-327.el7.x86_64 [root@zabbixserver ~] # [root@zabbixserver ~] # ifconfig eno16777736eno16777736: flags=4163 mtu 1500 inet 10.0.98 netmask 255.255.255.0 broadcast 10.0.0.255 inet6 fe80::20c:29ff:fef2:d583 prefixlen 64 scopeid 0x20 ether 00poly0c : 29:f2:d5:83 txqueuelen 1000 (Ethernet) RX packets 150143 bytes 218651391 (208.5 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 30015 bytes 2046005 (1.9MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@zabbixserver ~] #
2. install the software package:
[root@zabbixserver tools] # lltotal 65776 Oct RW nginx-1.10.2.tar.gz-rw-r--r---1 root root 523321 Jan 10 10:27 libmcrypt-2.5.7.tar.gz-rw-r--r-- 1 root root 32167628 Nov 28 07:46 mysql-5.6.35.tar.gz-rw-r--r-- 1 root root 910812 Oct 18 11:14 nginx-1.10.2.tar.gz-rw-r--r-- 1 root root 18331135 Aug 6 2015 php-5.6. 12.tar.gzmurrwmurf-1 root root 15412400 Jan 10 12:01 zabbix-3.0.5.tar.gz [root@zabbixserver tools] #
Third, installation steps
(1) create a user zabbix
[root@zabbixserver ~] # useradd zabbix-s / sbin/nologin [root@zabbixserver ~] # id zabbixuid=1000 (zabbix) gid=1000 (zabbix) groups=1000 (zabbix) [root@zabbixserver ~] #
(2) install the compilation tool cmake that executes the compilation of MySQL, (cmake will be used for later compilation from MySQL5.5)
[root@zabbixserver ~] # yum-y install cmake cmake-devel [root@zabbixserver ~] #
(3) create MySQL users
[root@zabbixserver ~] # useradd mysql-s / sbin/nologin [root@zabbixserver ~] # id mysqluid=1001 (mysql) gid=1001 (mysql) groups=1001 (mysql) [root@zabbixserver ~] #
(4) install MySQL, compile with cmake, and install the dependency package openssl openssl-devel ncurses ncurses-devel first
[root@zabbixserver ~] # yum install-y openssl openssl-devel ncurses ncurses-devel [root@zabbixserver ~] # cd tools [root@zabbixserver tools] # tar xf mysql-5.6.35.tar.gz [root@zabbixserver tools] # cd mysql-5.6.35 [root@zabbixserver mysql-5.6.35] # [root@zabbixserver mysql-5.6.35] # cmake\-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\-DMYSQL_DATADIR=/usr/local/mysql/data\ -DSYSCONFDIR=/etc\-DWITH_MYISAM_STORAGE_ENGINE=1\-DWITH_INNOBASE_STORAGE_ENGINE=1\-DWITH_MEMORY_STORAGE_ENGINE=1\-DWITH_READLINE=1\-DMYSQL_TCP_PORT=3306\-DENABLED_LOCAL_INFILE=1\-DWITH_PARTITION_STORAGE_ENGINE=1\-DEXTRA_CHARSETS=all\-DDEFAULT_CHARSET=utf8\-DDEFAULT_COLLATION=utf8_general_ci\-DMYSQL_USER=mysql\-DWITH_DEBUG=0\ -DWITH_SSL= system [root @ zabbixserver mysql-5.6.35] # make & & make install
(5) configure MySQL
# modify the permissions of MySQL installation directory
[root@zabbixserver mysql-5.6.35] # chown-R mysql.mysql / usr/local/mysql/
# copy configuration file
[root@zabbixserver mysql-5.6.35] # cp support-files/my-default.cnf / etc/my.cnf
# modify configuration file
[root@zabbixserver mysql-5.6.35] # vim / etc/ my.cnf [client] port = 3306socket = / usr/local/mysql/data/ socket [mysqld] basedir = / usr/local/mysqldatadir = / usr/local/mysql/dataport = 3306server_id = 1socket = / usr/local/mysql/data/socket [client] #
# initialize the database to generate the basic data structure of the database
[root@zabbixserver mysql-5.6.35] # / usr/local/mysql/scripts/mysql_install_db-defaults-file=/etc/my.cnf-basedir=/usr/local/mysql-datadir=/usr/local/mysql/data-user=mysql
# copy the MySQL database startup script, assign executable permissions and set boot
[root@zabbixserver mysql-5.6.35] # cp support-files/mysql.server / etc/init.d/mysqld [root@zabbixserver mysql-5.6.35] # chmod + x / etc/init.d/mysqld [root@zabbixserver mysql-5.6.35] # ll / etc/init.d/mysqld-rwxr-xr-x 1 root root 10875 Jan 10 18:11 / etc/init.d/mysqld [root@zabbixserver mysql-5.6.35] # [root@zabbixserver mysql-5.6.35] # chkconfig mysqld on
# modify PATH variable
[root@zabbixserver mysql-5.6.35] # echo 'export PATH=/usr/local/mysql/bin:$PATH' > / etc/profile [root@zabbixserver mysql-5.6.35] # tail-1 / etc/profileexport PATH=/usr/local/mysql/bin:$PATH [root@zabbixserver mysql-5.6.35] # source / etc/profile [root@zabbixserver mysql-5.6.35] #
# launch MySQL to test whether to log in
[root@zabbixserver mysql-5.6.35] # / etc/init.d/mysqld startStarting MySQL. SUCCESS! [root@zabbixserver mysql-5.6.35] # mysqlWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 1Server version: 5.6.35 Source distributionCopyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >\ s-mysql Ver 14.14 Distrib 5.6.35, for Linux (x86 / 64) using EditLine wrapperConnection id: 1Current database:Current user: root@localhostSSL: Not in useCurrent pager: stdoutUsing outfile:''Using delimiter: Server version: 5.6.35 Source distributionProtocol version: 10Connection: Localhost via UNIX socketServer characterset: utf8Db characterset: utf8Client characterset: utf8Conn. Characterset: utf8UNIX socket: / usr/local/mysql/data/socketUptime: 8 secThreads: 1 Questions: 5 Slow queries: 0 Opens: 70 Flush tables: 1 Open tables: 63 Queries per second avg: 0.625-mysql >
# modify the database password. The default password is empty
Mysql > SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' root'); Query OK, 0 rows affected (0.00 sec) mysql > flush privileges;Query OK, 0 rows affected (0.00 sec) mysql > # remove unnecessary user mysql > select user,host from user +-+-+ | user | host | +-+-+ | root | 127.0.0.1 | | root |: 1 | | localhost | | root | localhost | zabbixserver | | root | zabbixserver | +-+-+ 6 rows in set ( 0.00 sec) mysql > mysql > delete from user where user= "root" and host= ":: 1" Query OK, 1 row affected (0.00 sec) mysql > delete from user where user= "" and host= "zabbixserver"; Query OK, 1 row affected (0.00 sec) mysql > select user,host from user +-+-+ | user | host | +-+-+ | root | 127.0.0.1 | | localhost | | root | localhost | root | zabbixserver | +-+-+ 4 rows in set (0.00 sec) mysql > delete from user where user= "" and host= "localhost" Query OK, 1 row affected (0.00 sec) mysql > select user,host from user;+-+-+ | user | host | +-+-+ | root | 127.0.0.1 | | root | localhost | | root | zabbixserver | +-+-+ 3 rows in set (0.00 sec) mysql >
# create zabbix users who access MySQL and database zabbix where zabbix is stored
Mysql > GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'127.0.0.1' IDENTIFIED BY' zabbix' WITH GRANT OPTION;Query OK, 0 rows affected (0.00 sec) mysql > create database zabbix default charset utf8;Query OK, 1 row affected (0.00 sec) mysql > select user,host from user +-+ | user | host | +-+-+ | root | 127.0.0.1 | | zabbix | 127.0.0.1 | | root | localhost | | root | zabbixserver | +-+-+ 4 rows in set (0.00 sec) mysql > show databases +-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | test | | zabbix | +-+ 5 rows in set (0.00 sec) mysql >
(6) install PHP
# install dependency packages
[root@zabbixserver ~] # yum install-y libxml2-devel openssl-devel libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel libmcrypt-devel# create users and user groups that launch PHP Decompress the PHP package into the compressed directory to compile and install [root@zabbixserver] # useradd www-s / sbin/nologin [root@zabbixserver ~] # id wwwuid=1002 (www) gid=1002 (www) groups=1002 (www) [root@zabbixserver ~] # [root@zabbixserver ~] # cd tools [root@zabbixserver tools] # tar xf php-5.6.12.tar.gz [root@zabbixserver tools] # cd php-5.6.12 [root@zabbixserver php-5.6.12] #. / Configure-- prefix=/usr/local/php\-- with-config-file-path=/usr/local/php/etc\-- enable-fpm\-- with-fpm-user=www\-- with-fpm-group=www\-- with-mysql=mysqlnd\-- with-mysqli=mysqlnd\-- with-pdo-mysql=mysqlnd\-- with-iconv-dir\-- with-freetype-dir\-- with-jpeg-dir\-- with-png-dir\-with-zlib\-- with-libxml-dir=/usr\-- -enable-xml\-- disable-rpath\-- enable-bcmath\-- enable-shmop\-- enable-sysvsem\-- enable-inline-optimization\-- with-curl\-- enable-mbregex\-- enable-mbstring\-- with-mcrypt\-- enable-ftp\-- with-gd\-enable-gd-native-ttf\-with-openssl\-with-mhash\-enable-pcntl\-enable-sockets\-with-xmlrpc\-- enable-zip\-- -enable-soap\-without-pear\-with-gettext\-disable-fileinfo\-enable-maintainer-zts [root@zabbixserver php-5.6.12] # make & & make install
# configure PHP related services
[root@zabbixserver php-5.6.12] # cp / usr/local/php/etc/php-fpm.conf.default / usr/local/php/etc/php-fpm.conf [root@zabbixserver php-5.6.12] # cp php.ini-production / usr/local/php/etc/php.ini [root@zabbixserver php-5.6.12] # cp sapi/fpm/init.d.php-fpm / etc/init.d/php-fpm [root@zabbixserver php-5.6. 12] # chmod + x / etc/init.d/php-fpm [root@zabbixserver php-5.6.12] # ll / etc/init.d/php-fpm-rwxr-xr-x 1 root root 2354 Jan 10 18:54 / etc/init.d/php-fpm [root@zabbixserver php-5.6.12] # [root@zabbixserver php-5.6.12] # chkconfig php-fpm on [root@zabbixserver ~] # service php-fpm startStarting php-fpm done [root@zabbixserver ~] # netstat -lnupt | grep php-fpmtcp 00 127.0.0.1 LISTEN 51556/php-fpm 9000 0.0.0.0 LISTEN 51556/php-fpm: mast [root@zabbixserver ~] #
(7) install Nginx
[root@zabbixserver tools] # tar xf nginx-1.10.2.tar.gz [root@zabbixserver tools] # cd nginx-1.10.2 [root@zabbixserver nginx-1.10.2] #. / configure-- prefix=/usr/local/nginx\-- pid-path=/usr/local/nginx/nginx.pid\-- error-log-path=/usr/local/nginx/error.log\-- http-log-path=/usr/local/nginx/access.log\-- with-http_ Ssl_module-- with-mail\-- with-mail_ssl_module-- with-stream\-with-threads [root@zabbixserver nginx-1.10.2] # make & & make install [root@zabbixserver nginx-1.10.2] # / usr/local/nginx/sbin/nginx-tnginx: the configuration file / usr/local/nginx/conf/nginx.conf syntax is oknginx: configuration file / usr/local/nginx/conf/nginx.conf test is successful [root@zabbixserver nginx-1.10. 2] # / usr/local/nginx/sbin/nginx [root@zabbixserver nginx-1.10.2] # netstat-lnupt | grep nginxtcp 0 0 0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0 of the grep nginxtcp * LISTEN 54318/nginx: master [root@zabbixserver nginx-1.10.2] #
(8) install zabbix
# install dependency packages
[root@zabbixserver tools] # yum install-y net-snmp-devel libssh3-devel
# decompress, compile and install
[root@zabbixserver tools] # tar xf zabbix-3.0.5.tar.gz [root@zabbixserver tools] # cd zabbix-3.0.5 [root@zabbixserver zabbix-3.0.5] #. / configure-- prefix=/usr/local/zabbix\-- enable-server-- enable-agent\-- with-mysql-with-net-snmp\-- with-libcurl-- with-libxml2\-- with-ssh3 [root@zabbixserver zabbix-3.0.5] # make & & make install
# verify the installation result
[root@zabbixserver zabbix-3.0.5] # / usr/local/zabbix/sbin/zabbix_server-Vzabbix_server (Zabbix) 3.0.5Revision 62889 30 September 2016, compilation time: Jan 10 2017 19:04:09Copyright (C) 2016 Zabbix SIALicense GPLv2+: GNU GPL version 2 or later. This is free software: you are free to change and redistribute it according tothe license. There is NO WARRANTY, to the extent permitted by law. [root@zabbixserver zabbix-3.0.5] #
# View configuration file default settings
[root@zabbixserver zabbix-3.0.5] # egrep-v "^ # | ^ $" / usr/local/zabbix/etc/zabbix_server.confLogFile=/tmp/zabbix_server.logDBName=zabbixDBUser=zabbixTimeout=4LogSlowQueries= 3000 [root @ zabbixserver zabbix-3.0.5] #
# modified to
[root@zabbixserver zabbix-3.0.5] # egrep-v "^ # | ^ $" / usr/local/zabbix/etc/zabbix_server.confLogFile=/usr/local/zabbix/etc/log/zabbix_server.logPidFile=/usr/local/zabbix/etc/zabbix_server.pidDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbixTimeout=4LogSlowQueries=3000 [root@zabbixserver zabbix-3.0.5] #
# create the corresponding directory and modify the owner and group
[root@zabbixserver zabbix-3.0.5] # mkdir-p / usr/local/zabbix/etc/log [root@zabbixserver zabbix-3.0.5] # chown-R zabbix.zabbix / usr/local/zabbix/* [root@zabbixserver zabbix-3.0.5] #
# Import zabbix data into zabbix database, pay attention to the order, it must be schema.sql, p_w_picpaths.sql, data.sql
[root@zabbixserver zabbix-3.0.5] # mysql-uzabbix-pzabbix-h227.0.0.1 zabbix
< /root/tools/zabbix-3.0.5/database/mysql/schema.sql [root@zabbixserver zabbix-3.0.5]# mysql -uzabbix -pzabbix -h227.0.0.1 zabbix < /root/tools/zabbix-3.0.5/database/mysql/p_w_picpaths.sql [root@zabbixserver zabbix-3.0.5]# mysql -uzabbix -pzabbix -h227.0.0.1 zabbix < /root/tools/zabbix-3.0.5/database/mysql/data.sql [root@zabbixserver zabbix-3.0.5]# mysql>Use zabbixReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-ADatabase changedmysql > mysql > show tables +-- + | Tables_in_zabbix | +-+ | acknowledges | | actions | | alerts | | application_discovery | | application_prototype | | application_template | | applications | | auditlog | | auditlog_details | | autoreg_host | | conditions | | config | | dbversion | | dchecks | | dhosts | | drules | | dservices | | escalations | | | events | | expressions | | functions | | globalmacro | | globalvars | | graph_discovery | | graph_theme | | graphs | | graphs_items | | group_discovery | | group_prototype | | groups | | | history | | history_log | | history_str | | history_text | | history_uint | | host_discovery | | host_inventory | | hostmacro | | hosts | | hosts_groups | | hosts_ | Templates | | housekeeper | | httpstep | | httpstepitem | | httptest | | httptestitem | | icon_map | | icon_mapping | | ids | | p_w_picpaths | | interface | | interface _ discovery | | item_application_prototype | | item_condition | | item_discovery | | items | | items_applications | | maintenances | | maintenances_groups | | maintenances_hosts | | maintenances_windows | | mappings | | media | | media_type | | opcommand | | opcommand_grp | | opcommand_hst | | opconditions | | operations | | opgroup | | opinventory | | opmessage | | opmessage_grp | | opmessage_usr | | optemplate | | profiles | | proxy_ | Autoreg_host | | proxy_dhistory | | proxy_history | | regexps | | rights | | screen_user | | screen_usrgrp | | screens | | screens_items | | scripts | | service_alarms | | services | | services_links | | services_times | | sessions | | slides | | slideshow_user | | slideshow_usrgrp | | slideshows | | sysmap_element_url | | sysmap_url | | sysmap_user | | sysmap_usrgrp | Sysmaps | | sysmaps_elements | | sysmaps_link_triggers | | sysmaps_links | | timeperiods | | trends | | trends_uint | | trigger_depends | | trigger_discovery | | triggers | | users | | users_groups | | usrgrp | | valuemaps | +-- + 113rows in set (0.01sec) mysql >
# add startup script to grant execution permission and modify
[root@zabbixserver zabbix-3.0.5] # cp misc/init.d/fedora/core/zabbix_agentd / etc/init.d/zabbix_ agentd [root @ zabbixserver zabbix-3.0.5] # cp misc/init.d/fedora/core/zabbix_server / etc/init.d/zabbix_server [root@zabbixserver zabbix-3.0.5] # [root@zabbixserver zabbix-3.0.5] # sed-I "s#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix # g "/ etc/init.d/zabbix_ server [root @ zabbixserver zabbix-3.0.5] # sed-I" s#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix#g "/ etc/init.d/zabbix_ agentd [root @ zabbixserver zabbix-3.0.5] # [root@zabbixserver zabbix-3.0.5] # chmod + x / etc/init.d/zabbix_agentd [root@zabbixserver zabbix-3.0.5] # chmod + x / etc/init.d/ Zabbix_server [root@zabbixserver zabbix-3.0.5] #
# set Boot Startup
[root@zabbixserver zabbix-3.0.5] # chkconfig zabbix_server on [root@zabbixserver zabbix-3.0.5] # chkconfig zabbix_agentd on [root@zabbixserver zabbix-3.0.5] #
# set zabbix to support Nginx+PHP combination access
[root@zabbixserver zabbix-3.0.5] # mkdir-p / data/web/site/www [root@zabbixserver zabbix-3.0.5] # cp-rfp frontends/php/* / data/web/site/www/-R [root@zabbixserver zabbix-3.0.5] # chown-R root.root / data/web/site/www/ [root@zabbixserver zabbix-3.0.5] # [root@zabbixserver zabbix-3.0.5] # cp / usr/local/nginx/ Conf/nginx.conf / usr/local/nginx/conf/nginx.conf.bak [root@zabbixserver zabbix-3.0.5] # vim / usr/local/nginx/conf/nginx.confuser root Worker_processes 4 is responsible for errorship log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events {worker_connections 1024;} http {include mime.types; default_type application/octet-stream # log_format main'$remote_addr-$remote_user [$time_local] "$request" #'$status $body_bytes_sent "$http_referer" #'"$http_user_agent"$http_x_forwarded_for"; # access_log logs/access.log main; sendfile on; # tcp_nopush on; # keepalive_timeout 0; keepalive_timeout 65 # gzip on; server {listen 80; server_name localhost; # charset koi8-r; # access_log logs/host.access.log main; location / {root / data/web/site/www; index index.php index.html index.htm;} error_page 500502 503504 / 50x.html Location = / 50x.html {root html;} # pass the PHP scripts to FastCGI server listening on 127.0.0.1 pass the PHP scripts to FastCGI server listening on 9000 location ~\. Php$ {root / data/web/site/www; fastcgi_pass 127.0.0.1 root html; 9000; fastcgi_index index.php Fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # fastcgi_param SCRIPT_FILENAME / scripts$fastcgi_script_name; include fastcgi_params }} [root@zabbixserver zabbix-3.0.5] # / usr/local/nginx/sbin/nginx-tnginx: the configuration file / usr/local/nginx/conf/nginx.conf syntax is oknginx: configuration file / usr/local/nginx/conf/nginx.conf test is successful [root@zabbixserver zabbix-3.0.5] # / usr/local/nginx/sbin/nginx-s reload [root@zabbixserver zabbix-3.0.5] #
# clear firewall policy
[root@zabbixserver zabbix-3.0.5] # iptables-F [root@zabbixserver zabbix-3.0.5] # iptables-X [root@zabbixserver zabbix-3.0.5] # iptables-Z [root@zabbixserver zabbix-3.0.5] #
Enter http://10.0.0.98 through the browser to enter the installation zabbix interface
Click "Next step"
The above error is encountered because the default parameters in the PHP configuration file / usr/local/php/etc/php.ini do not meet the zabbix requirements. Here, we make the following adjustments:
Post_max_size = 32Mmax_execution_time = 300max_input_time = 300date.timezone = "Asia/Shanghai" always_populate_raw_post_data =-1 [root@zabbixserver etc] # service php-fpm restartGracefully shutting down php-fpm. DoneStarting php-fpm done [root@zabbixserver etc] #
Then refresh the page, and then the next step
Enter the password "zabbix", and next step
Enter "127.0.0.1" and then go straight to the next step.
Move on to the next step.
And the next step.
Follow the prompts to download the zabbix.conf.php file and place it in the / data/web/site/www/conf directory
[root@zabbixserver etc] # cd / data/web/site/www/conf [root@zabbixserver conf] # rzrz waiting to receive.Starting zmodem transfer. Press Ctrl+C to cancel. Bytes/s 00:00:01 0 Errors [root@zabbixserver conf] # lltotal 12 root root 1036 Sep 30 05:42 maintenance.inc.php-rw-r--r-- 1 root root 415 Jan 10 10:48 zabbix.conf.php-rw-r--r-- 1 root root 411 Sep 30 05:42 zabbix.conf.php.example [root@zabbixserver conf] #
Refresh the page and click "finish" to complete the installation of the zabbix server.
Common parameters for compiling and installing zabbix
(1) install sever and agent at the same time, and support putting data into MySQL database. You can use commands like the following
/ configure-- prefix=/usr/local/zabbix-- enable-server-- with-mysql-- with-ipv6-- with-net-snmp-- with-libcurl-- with-ssh3
(2) if you only install server and support putting data into MySQL data, you can use configuration commands similar to the following:
. / configure-prefix=/usr/local/zabbix-enable-server-with-mysql-with-net-snmp-with-libcurl
(3) if only proxy is installed. And support for putting data into the MySQL database, using commands similar to the following
/ configure-- prefix=/usr/local/zabbix-- enable-proxy-- with-mysql-- with-net-snmp-- with-mysql-- with-ssh3
a. Create a database and authorize it (either local or remote)
Create database zabbix_proxy
Grant all on zabbix_proxy.* to 'zabbix'@'localhost' identified by' zabbix'
Flush privileges
b. Import zabbix default data file
Mysql-hhostname-uuser-ppassword zabbix_proxy
< /root/tools/zabbix-3.0.5/database/mysql/schema.sql #proxy端只需要导入这个文件 c.修改配置文件zabbix_proxy.conf Server=IP #zabbix服务端IP Hostname=zabbix_proxy #必须和WEB页面添加代理时设置的名称一致 LogFile=/var/log/zabbix/zabbix_proxy.log DBHost=localhost #数据库IP DBName=zabbix_proxy #数据库名 DBUser=zabbix #数据库用户名 DBPassword=zabbix #数据库密码 (4)如果仅安装agent,可使用类似如下配置命令 ./configure --prefix=/usr/local/zabbix --enable-agent 注意:在安装PHP时会出现一些错误,下面是一些常见错误解决方法 安装php遇到问题解决办法: configure: error: mcrypt.h not found. Please reinstall libmcrypt. 解决办法 wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz #解压 tar -zxvf libmcrypt-2.5.7.tar.gz #进入目录 cd libmcrypt-2.5.7 #编译(默认安装到/usr/local/lib/) ./configure --prefix=/usr/local/libmcrypt #执行安装 make && make install configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no 解决方法一: 查看php官方文档解决. 在configure 里面加上 --with-libdir=lib64 解决方法二: 编辑/etc/ld.so.conf 根据系统,加入include /etc/ld.so.conf, 然后执行ldconfig,使其重新加载一次;(如果出错改为vi /etc/ld.so.conf >> include / usr/local/libmcrytp/lib/)
Configure: error: Don't know how to define struct flock on this system, set-- enable-opcache=no
The solution is:
Echo / usr/local/mysql/lib > > / etc/ld.so.conf.d/mysql-x86_64.conf
Ldconfig-v
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.