In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to smoothly upgrade php". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to smoothly upgrade php" can help you solve the problem.
Php smooth upgrade 1. Since it is a smooth upgrade, there is no need to downtime or stop the service, and there is no argument for shutting down the website. In the final restart of the upgrade, the restart is the configuration file loaded by PHP, which does not affect the website you are currently running. 3.php-fpm belongs to FastCgi. Once started, it runs in memory, which has nothing to do with the process of compiling and upgrading.
System: centos6.8
Php environment: php5.3.29
Upgrade version: php5.4.45
Download php address: http://www.php.net/distributi...
Copy the php5.3.29 installation directory config.nice to php-5.4.25
[root@localhost php-5.4.45] # cp / php-5.3.29/config.nice / usr/local/src/php-5.4.45
[root@localhost php-5.4.45] # cd php-5.4.45/
[root@localhost php-5.4.45] #. / config.nice
[root@localhost php-5.4.45] # make ZEND_EXTRA_LIBS='-liconv'
[root@localhost php-5.4.45] # make install
After the upgrade is completed, it is recommended that you execute the command: You may want to add: / usr/local/php5/lib/php to your php.ini include_path/usr/local/src/php-5.4.45/build/shtool install-c ext/phar/phar.phar / usr/local/php5/binln-s-f / usr/local/php5/bin/phar.phar / usr/local/php5/bin/pharInstalling PDO headers: / usr/local/php5/include/php/ext/pdo/ may encounter errors in the installation
Reason: if an error message such as "undefined reference to libiconv_open'" occurs when installing PHP into the system, it means that some environment variables are not grasped in ". / configure". The error occurred when creating the "- o sapi/cli/php" and did not give the iconv library parameters to the link.
The first solution: edit Makefile about 77 lines: EXTRA_LIBS =. -lcrypt adds-liconv at the end, for example: EXTRA_LIBS =. -lcrypt-liconv and then make again.
The second solution:
Make ZEND_EXTRA_LIBS='-liconv'
Ln-s / usr/local/lib/libiconv.so.2 / usr/lib64/
Curl upgrade
Description: curl uses yum by default to install SSL version as NSS, and existing projects need to support OpenSSL.
Current curl version
Phpinfo output information
Download the latest curl: https://curl.haxx.se/download/curl-7.54.1.tar.gz
Start the upgrade:
[root@IM-web-03 html] # rpm-qa | grep curllibcurl-devel-7.19.7-53.el6_9.x86_64curl-7.19.7-53.el6_9.x86_64libcurl-7.19.7-53.el6_9.x86_64python-pycurl-7.19.0-9.el6.x86_64 [root@IM-web-03 html] # rpm-e curl-7.19.7-53.el6_9.x86_64-nodeps [root@IM -web-03 ~] # tar xvf curl-7.54.1.tar.gz [root@IM-web-03 ~] # cd curl-7.54.1 [root@IM-web-03 curl-7.54.1] #. / configure-- prefix=/usr/local/curl-- without-nss-- with-ssl # close NSS and open OpenSSL [root@IM-web-03 curl-7.54.1] # make [root@IM-web-03 curl-7.54. 1] # make install [root@IM-web-03 curl-7.54.1] # rm-rf / usr/lib64/libcurl.so.4* # Delete the original dynamic library [root@IM-web-03 curl-7.54.1] # ln-s / usr/local/curl/lib/libcurl.so.4* / usr/lib64/ # put the new dynamic library in the corresponding location [root@IM-web-03 Curl-7.54.1] # ldconfig # refresh dynamic library [root@IM-web-03 ~] # cd php-5.3.29/ext/curl/ [root@IM-web-03 curl] # / usr/local/php5/bin/phpize [root@IM-web-03 curl] #. / configure-- with-curl=/usr/local/curl/-- with-php-config= / usr/local/php5/bin/php-config [root@IM-web-03 curl] # make [root@IM-web-03 curl] # make install [root@IM-web-03 curl] # vim / usr/local/php5/etc/php.ini add: extension= "/ usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/curl.so" [root@IM-web-03 curl] # / etc/init.d/php-fpm restart
Check version curl and PHPinfo version information after upgrade
This is the end of the introduction to "how to smoothly upgrade php". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.