In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you how to compile and install php-5.3.27.tar.gz in the lnmp environment, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1. Experimental environment
Environment: CentOS6.5
Software: php-5.3.27.tar.gz
Second, the experimental steps
1.PHP installation preparation
1) install the package zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel that php depends on
Yum-y install zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel
2) check whether they are all installed
Rpm-qa zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel
3) install libiconv-1.14.tar.gz
Tar zxf libiconv-1.14.tar.gz
Cd libiconv-1.14
. / configure-- prefix=/usr/local/libiconv
Make
Make install
4) install the libmcrypt library, here using the chapter-based epel source method to install the libmcrypt package
Wget-O / etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
Yum-y install libmcrypt
5) install the mcypt encryption extension library
Yum-y install mcrypt
6) install mhash encryption algorithm
Yum-y install mhash
7) install libxslt-devel
Yum-y install libxslt-devel
two。 Start installing the PHP service
1) download php-5.3.37.tar.gz and decompress it.
Tar xf php-5.3.27.tar.gz
2) compile and install php-5.3.27
Cd php-5.3.27
. / configure\
-- prefix=/application/php-5.3.27\
-- with-mysql=/application/mysql\
-- with-iconv-dir=/usr/local/libiconv\
-- with-freetype-dir\
-- with-jpeg-dir\
-- with-png-dir\
-- with-zlib\
-- with-libxml-dir=/usr\
-- enable-xml\
-- disable-rpath\
-- enable-safe-mode\
-- enable-bcmath\
-- enable-shmop\
-- enable-sysvsem\
-- enable-inline-optimization\
-- with-curlwrappers\
-- enable-mbregex\
-- enable-mbstring\
-- enable-fpm\
-- with-mcrypt\
-- with-gd\
-- enable-gd-native-ttf\
-- with-openssl\
-- with-mhash\
-- enable-pcntl\
-- enable-sockets\
-- with-xmlrpc\
-- enable-zip\
-- enable-soap\
-- enable-short-tags\
-- enable-zend-multibyte\
-- enable-static\
-- with-xsl\
-- with-fpm-user=nginx\
-- with-fpm-group=nginx\
-- enable-ftp
Note: add these two commands before make:
Ln-s / application/mysql/lib/libmysqlclient.so.18 / usr/lib64/
Touch ext/phar/phar.phar
Make & & make install
Ln-s / application/php-5.3.27/ / application/php/
3) configure php parsing configuration file
Cp php.ini-production / application/php/lib/php.ini
Cp php-fpm.conf.default. / php-fpm.conf
4) start the php process
/ application/php/sbin/php-fpm
Lsof-I: 9000
5) write a test_phpinfo.php code under the nginx site directory to test php
6) enter the domain name to access, and the result is as follows:
The above is all the contents of the article "how to compile and install php-5.3.27.tar.gz in lnmp environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.