Environment: centos6.4,13 a source package; reference Tutorial Goro php
Idea: 1. First determine the installation of gcc,g++, because this is the C language compiler tool, without it, the source code can not be installed, Redhat
Yum needs to be configured, divided into local source and network source, the local source configuration is Ctrl+alt jump out of the virtual machine will be set in the ISO to the downloaded
Source note the need to hook up to connect this option, CentOS is open Source Enterprise Edition Redhat so directly with no need to configure Yum source, I choose CentOS
Using Yum to solve the problem of g++, but also to the official website to consult, dependence, but must be better English
2. The general order of installation is Apache-->mysql--->php; but install this several, is need to rely on a lot of things, so the early work
Basically is the need to rely on the package to install to the specified location, usually the source package 13 is copied to the/usr/src/directory
Then configure-"compile-" to install into the usr/local/xxx directory, so as to facilitate the subsequent installation of PHP to specify the location of the corresponding dependency package
If all is yum, install PHP only need to specify two parameters on the line, the other dependencies will automatically find the default location;
3. Install PHP the most troublesome need to specify the location of the corresponding dependency package:
-------------------------------------------------------
#./configure \//Execute configuration commands for the software generation under the current directory
>--prefix=/usr/local/php \//Set the installation path for PHP5
>--WITH-CONFIG-FILE-PATH=/USR/LOCAL/PHP/ETC \//Specify the path where the PHP5 profile is stored
>--WITH-APXS2=/USR/LOCAL/APACHE2/BIN/APXS \//Tell PHP where to find Apache 2
>--with-mysql=/usr/local/mysql/\//Specify the installation directory for MySQL
>--with-libxml-dir=/usr/local/libxml2/\//Tell PHP where to place the LIBXML2 library
>--with-png-dir=/usr/local/libpng/\//Tell PHP where to place the libpng library
>--with-jpeg-dir=/usr/local/jpeg6/\//Tell PHP where to place the JPEG library
>--with-freetype-dir=/usr/local/freetype/\//Tell PHP where to place the FreeType library
>--with-gd=/usr/local/gd2/\//Tell PHP where to place the GD library
>--with-zlib-dir=/usr/local/zlib/\//Tell PHP where to place the zlib library
>--with-mcrypt=/usr/local/libmcrypt/\//Tell PHP where to place the Libmcrypt library
>--with-mysqli=/usr/local/mysql/bin/mysql_config \//variable activation new added mysqli function
>--ENABLE-SOAP \//Variable activation soap and Web services support
>--enable-mbstring=all \//enable multibyte string support
>--enable-sockets//variable activation socket communication features #make && make install
------------------------------------------------------------------------------------------------
So the pre-work needs to be done! Especially in the designation >--with-png-dir=/usr/local/libpng/\//Tell PHP where to place the libpng library
>--with-jpeg-dir=/usr/local/jpeg6/\ Specify a specific location to install it!
4. Finally need to copy PHP configuration template to the corresponding directory, and then need to modify the Apache configuration file plus support PHP and Phphandle
Finally need to shut down the firewall to access;
Lamp Environment Construction Experience Summary