In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces LAMP how to compile and install php-5.4.13, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
1. Resolve dependencies:
If you want the compiled php to support mcrypt extensions, you need to download and install the following two rpm packages:
Libmcrypt-2.5.7-5.el5.i386.rpm
Libmcrypt-devel-2.5.7-5.el5.i386.rpm
Note: www.rpmfind.net
2. Compile and install php-5.4.13
First download the source package to the local directory.
# tar xf php-5.4.13.tar.bz2# cd php-5.4.13#. / configure-prefix=/usr/local/php-- with-mysql=/usr/local/mysql-- with-openssl-- with-mysqli=/usr/local/mysql/bin/mysql_config-- enable-mbstring-- with-freetype-dir-- with-jpeg-dir-- with-png-dir-- with-zlib-- with-libxml-dir=/usr-- enable-xml-- enable- Sockets-with-apxs2=/usr/local/apache/bin/apxs-with-mcrypt-with-config-file-path=/etc-with-config-file-scan-dir=/etc/php.d-with-bz2-enable-maintainer-zts# make# make test# make intall
Description:
(1. In order to support apache's worker or event MPM, the-- enable-maintainer-zts option is used at compile time.
(2. If you are using PHP5.3 or above, you can specify mysqlnd in order to link to the MySQL database, so that you do not need to install MySQL or MySQL development packages on this machine. Mysqlnd is available since php 5.3 and can be bound to it at compile time (without having to rely on specific MySQL client library bindings), but it has been the default since PHP 5.4.
#. / configure-with-mysql=mysqlnd-with-pdo-mysql=mysqlnd-with-mysqli=mysqlnd
(3.-- with-apxs2=/usr/local/apache/bin/apxs means to compile php into a httpd module, which needs to be replaced with-- enable-fpm if you want to combine with http in fcgi mode
Provide a configuration file for php:
# cp php.ini-production / etc/php.ini
3. Edit the apache configuration file httpd.conf to support php with apache
# vim / etc/httpd/httpd.conf
1. Add the following two lines
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
2. Navigate to DirectoryIndex index.html
Modified to:
DirectoryIndex index.php index.html
Then restart httpd or have it reload the configuration file to test whether php is working properly.
Thank you for reading this article carefully. I hope the article "how to compile and install php-5.4.13 for LAMP" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.