Installation of PHP in lamp

Source: Internet
Author: User
Tags install openssl

1, Environment: Linux moban 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 03:15:09 UTC x86_64 x86_64 x86_64 gnu/linux

2. Software version: apache2.2.27 mysql-5.5.32-linux2.6-x86_64 php5.3.27

3. Before installing PHP, you must first confirm that your Apache and MySQL are already installed and make normal. to be able to install successfully, it is best to check it again.

4. Check the Lib library required to install PHP; For security purposes, install it directly here.

yum install zlib libxml libjpeg freetype libpng gd Curl Libiconv zlib-devel libxml2-devel Libjpeg-deve L freetype-devel libpng-devel gd-devel curl-devel-y

5, libiconv-is used for conversion coding, preferably installed.

tar zxf libiconv-1.14.tar.gz

CD libiconv-1.14

./configure--prefix=/usr/local/libiconv

Make

Make install

Cd.. /

6. Installation:

Yum Install Openssl-devel-y

Yum Install libx*-y

7, after the TAR XF decompression began to install php;

./configure \

--prefix=/application/php5.3.27 \

--WITH-APXS2=/APPLICATION/APACHE/BIN/APXS \

--with-mysql=/application/mysql \

--WITH-XMLRPC \

--WITH-OPENSSL \

--with-zlib \

--with-freetype-dir \

--WITH-GD \

--with-jpeg-dir \

--with-png-dir \

--with-iconv=/usr/local/libiconv \

--enable-short-tags \

--enable-sockets \

--enable-zend-multibyte \

--ENABLE-SOAP \

--enable-mbstring \

--enable-static \

--ENABLE-GD-NATIVE-TTF \

--with-curl \

--with-xsl \

--ENABLE-FTP \

--with-libxml-dir

Note:--with-iconv=/usr/local/libiconv \--with-apxs2=/application/apache/bin/apxs (by specifying Apache's bin/ Apxs path PHP extension to Apache) \--with-mysql=/application/mysql \ Path do not make mistakes, avoid unnecessary errors.

Observation: "Thank for using PHP." Indicates no problem with installation!

Check if/application/apache/modules/is generated under this path:libphp5.so

8, then make &&make install;

9,echo $?

Return to: 0

10, the installation is done.

11. PHP Configuration File

Ls-al php.ini-*

-rw-r--r--1 101 101 69606 July php.ini-development #开发使用

-rw-r--r--1 101 101 69627 July php.ini-production #生产环境使用

Diff ' ls php.ini-* ' can be used to compare;

12. Copy the configuration file:

CP Php.ini-production/application/php/lib/php.ini

Summary: The official configuration file is generally closed to display log, not output log.





This article from "A File a command" blog, declined reprint!

Installation of PHP in lamp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.