In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Software
Before upgrad
After upgrad
Php
5.3.3
5.6.6 (requirement > 5.4)
Apache
2.2.15
2.2.15 (unchanged)
Mysql
5.1.73
5.1.73 (unchanged)
CentOS
CentOS 6.3 x86_64
CentOS 6.3 x 86'64 (unchanged)
Zabbix
2.4.4
3.0.4
Premise:
Zabbix2.4.4 is running. There is already an apache+mysql+php environment.
The php installed by Centos6.3 yum is version 5.3, so install php5.6.6 by compiling next
Apache and mysql do not need to be upgraded.
If you upgrade on the same server, the data will be lost during the upgrade.
1.1 compile php
1.1.1 install some basic software packages
Yum-y install bzip2-devel libxml2-devel libxml2 httpd-devel icu libicu libicu-devellibpng* gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel
1.1.2 compiling freetype
Tar zxvf freetype-2.5.5.tar.gz
. / configure-- prefix=/usr/local/freetype
Make & & make install
1.1.3 compiling jpeg
Tar zxvf jpegsrc.v8b.tar.gz
Cd jpeg
Cd jpeg-8b/
. / configure-prefix=/usr/local/jpeg-enable-shared
Make & & make install
1.1.4 compiling zlib
Tar zxvf zlib-1.2.8.tar.gz
Cd zlib-1.2.8
. / configure
Make & & make install
1.1.5 compiling libpng
Tar zxvf libpng-1.5.9.tar.gz
Cd libpng-1.5.9
-- prefix=/usr/local/libpng
. / configure-- prefix=/usr/local/libpng
Make
Make install
1.1.6 compiling libgd
Tar xvf libgd-2.2.2.tar
Cd libgd-2.2.2
. / configure-- prefix=/usr/local/gd2
Make & & make install
1.1.7 compile php:
Tar jxvf php-5.6.6.tar.bz2
Cd php-5.6.6
. / configure-- prefix=/usr/local/php-- with-config-file-path=/etc/-- with-apxs2=/usr/sbin/apxs-- with-bz2-- with-curl-- with-jpeg-dir=/usr/local/jpeg-- with-png-dir=/usr/local/libpng-- with-freetype-dir=/usr/local/freetype-- with-libxml-dir=/usr/local-- with-pdo-mysql=mysqlnd-- with-mysqli=mysqlnd-- with-mysql=mysqlnd-- with-gettext-- With-zlib-dir=/usr/local/zlib-with-gd=/usr/local/gd2-with-xpm-dir=/usr/lib64/-enable-sockets-disable-ipv6-enable-gd-native-ttf-enable-mbstring-enable-bcmath-enable-calendar-enable-dom-enable-xml-enable-fpm
Make & & make install
1.1.8 copy the php execution file
Mv / usr/bin/php / usr/bin/php.bak
Ln-s / usr/local/php/bin/php / usr/bin/php
1.1.9 View version
Php-v
1.1.10 modify php.ini
Change always_populate_raw_post_data = On to
Always_populate_raw_post_data =-1
1.2 Zabbix3.0
1.2.1 compiling zabbix3.0
Tar zxvf zabbix-3.0.4.tar.gz
/ configure-- prefix=/etc/zabbix-- enable-server-- enable-agent-- with-mysql-- enable-ipv6-- with-net-snmp-- with-libcurl-- with-libxml2
Make install
1.2.2 configuring zabbix
Cd / var/www/html/
Mv zabbix zabbix.bak
Cp-r / root/zabbix-3.0.4/frontends/php zabbix
Chown-R apache.apache zabbix
1.2.3 upload Chinese fonts
Upload font (regular italics) to / var/www/html/zabbix/fonts/
Sed-I's Charpy DejaVuSansUnique simkaiUnique g'/ var/www/html/zabbix/include/defines.inc.php
After completion, you can see as follows:
/ / define ('ZBX_FONT_NAME',' DejaVuSans')
Define ('ZBX_FONT_NAME',' simkai')
/ / define ('ZBX_GRAPH_FONT_NAME',' DejaVuSans'); / / font file name
Define ('ZBX_GRAPH_FONT_NAME',' simkai'); / / font file name
1.3 mysql
Note: grant localhost permission, but zabbix can not read to the database zabbix, and later changed to ip, which can be accessed by normal connection.
Although I used mysqldump backup. But because my mysql is stand-alone, dump, lock the library, resulting in data can not be written. And the source recovery of sql files after dump is very slow. It took 3 hours to source the 3G data. The total amount of online mysql data is about 15G. Fortunately, however, zabbix can automatically upgrade the database, but only lost a small part of the monitoring data, which has little impact.
1.3.1 mysql permission modification
Mysql-p
Grant all privileges on zabbix.* to zabbix@192.168.2.68 identified by 'zabbix'
Flush privileges
1.3.2 modify zabbix.conf.php
Vim / var/www/html/zabbix/conf/zabbix.conf.php
$DB ['SERVER'] changed from localhost to server ip
Change $DB ['PASSWORD'] from empty to your password
1.4 Apache
Restart apache
Service httpd restart
1.5 start zabbix3.0.4
Mv / usr/sbin/zabbix_server / usr/sbin/zabbix_server.bak (version 2.4 backup, or delete)
Ln-s / root/zabbix-3.0.4/src/zabbix_server/zabbix_server / usr/sbin/zabbix_server
Zabbix_server / / start zabbix
1.5.1 start and view the process
Pass through
1.5.2 View database upgrade through log
[root@localhost conf] # tail-f / tmp/zabbix_server.log
1.6Configuring zabbix self-booting
Cp / root/zabbix-3.0.4/misc/init.d/fedora/core/zabbix_server / etc/init.d/zabbix_server
Ln-s / usr/sbin/zabbix_server / usr/local/sbin/zabbix_server
Service zabbix_server start
Chkconfig-add zabbix_server
Chkconfig-level 345 zabbix_server on
Chkconfig-list zabbix_server
1.7 complete the interface
The above is sorted out after stepping on the pit, and some steps have been successfully avoided. Next, record the pit you stepped on.
2 error report
2.1 error when installing libpng:
Error report:
Pngfix.c:2151: undefined reference to `inflateReset2'
Resolve:
The installation of libpng1.6.6 started and there was a mismatch between versions, so the version / libpng-1.5.9 was replaced. Problem solved.
Reference link:
Http://stackoverflow.com/questions/19738464/pngfix-c2151-undefined-reference-to-inflatereset2
Error report:
Configure: error: Problem with libpng. (a | so) or libz. (a | so). Please check config.log for more information.
Resolve:
Recompile zlib
Error report:
Ext/gd/gd.c:1330: undefined reference to `XpmLibraryVersion'
Problem description: the installation location of the xpm library was not found
Solution:
1.rpm-ql libXpm: query the installation location of libXpm and find it under / usr/lib64/
two。 Add-- with-xpm-dir=/usr/lib64/ to recompile php,./configure
3.make & & make install succeeded!
2.2 Web page access, the database error report is as follows
Solution: most of the online talk is about re-importing zabbix's data architecture. Image.sql,schema.sql et al. But that doesn't solve the problem. Mainly because there is something wrong with some parameters of php compilation, zabbix failed to upgrade the database, so reported this error, correctly compiled php (more compilation parameters), and then started zabbix,zabbix will automatically upgrade the database.
11033 20160426 current database version 152119.126 (mandatory/optional): 0204000Univer 02040000
11033:20160426:152119.126 required mandatory version: 02040000
After the automatic upgrade is successful, you can see the log
More / var/log/zabbix/zabbix_server.log
37106:20160923:102819.654 using configuration file: / etc/zabbix/etc/zabbix_server.conf
37106Flux 20160923 current database version 102819.657 (mandatory/optional): 03000000Universe 03000000
37106:20160923:102819.657 required mandatory version: 03000000
2.3 Php compilation without png support
Check whether php supports it by writing the file index.php
View by visiting the web page
Http://192.168.2.68/index.php
Check that gd does not support png.
Solution: the compilation parameters are not correct.
Original compilation parameters:
/ configure-- prefix=/usr/local/php-- with-config-file-path=/etc/-- with-apxs2=/usr/sbin/apxs-- with-bz2-- with-curl-- with-libdir=lib64-- with-jpeg-dir=/usr/local-- with-png-dir=/usr/local-- with-freetype-dir=/usr/local-- with-libxml-dir=/usr/local-- with-pdo-mysql=mysqlnd-- with-mysqli=mysqlnd-- with-mysql=mysqlnd-- with-gettext-- with -zlib-with-gd-enable-sockets-disable-ipv6-enable-gd-native-ttf--enable-mbstring-enable-bcmath-enable-calendar-enable-dom-enable-xml-enable-fpm
Then recompile freetype, libpng, gd, etc.
Change to:
. / configure-- prefix=/usr/local/php-- with-config-file-path=/etc/-- with-apxs2=/usr/sbin/apxs-- with-bz2-- with-curl-- with-jpeg-dir=/usr/local/jpeg-- with-png-dir=/usr/local/libpng-- with-freetype-dir=/usr/local/freetype-- with-libxml-dir=/usr/local-- with-pdo-mysql=mysqlnd-- with-mysqli=mysqlnd-- with-mysql=mysqlnd-- with-gettext-- With-zlib-dir=/usr/local/zlib-with-gd=/usr/local/gd2-with-xpm-dir=/usr/lib64/-enable-sockets-disable-ipv6-enable-gd-native-ttf-enable-mbstring-enable-bcmath-enable-calendar-enable-dom-enable-xml-enable-fpm
Note: the red part has changed.
Recompile and access index.php again:
You can see that gd supports more.
2.4 start zabbix log to report an error
Error: unable to connect to the database:
Solution:
1. Give permissions to the database
two。 And modify the zabbix.conf.php file.
Vim / var/www/html/zabbix/conf/zabbix.conf.php
$DB ['SERVER']
$DB ['PASSWORD']
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.