The first thing you should think about is which to install first? That's a big relationship. Apache and MySQL which do not matter, PHP must be the last to install, because the installation of PHP to use the MySQL library.
Usually I am in order to install!!!
First, compile and install Apache
httpd-2.4.9 requires a newer version of APR and Apr-util, so it needs to be upgraded beforehand. There are two ways to upgrade, one is to compile the installation through source code, and the other is to upgrade the RPM package directly.
Can download the source code from the official website, directly to the official site download is good, not too much explanation.
1. First Compile and install Apr
Tar XF apr-1.5.0.tar.bz2 cd apr-1.5.0./configure--prefix=/usr/local/apr make && make install
2. Compile and install Apr-util
Tar XF apr-util-1.5.3.tar.bz2 cd apr-util-1.5.3./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR Make && make install
3. Compile and install httpd-2.4.9
Tar XF httpd-2.4.9.tar.bz2 cd httpd-2.4.9./configure--prefix=/usr/local/apache--sysconfdir=/etc/httpd24--enable-so --enable-ssl--enable-cgi--enable-rewrite--with-zlib--with-pcre--with-apr=/usr/local/apr--with-apr-util=/usr/ Local/apr-util--enable-modules=most--enable-mpms-shared=all--with-mpm=event make && make install
If the compilation is unsuccessful, it is good to note that some development packages are not installed, install the development package first, and then recompile the installation after executing two lines of code.
./configure--prefix=/usr/local/apache--sysconfdir=/etc/httpd24--enable-so--enable-ssl--enable-cgi-- Enable-rewrite--with-zlib--with-pcre--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util-- Enable-modules=most--enable-mpms-shared=all--with-mpm=event make && make install
Add:
(1) Constructing MPM as static module
In all platforms, MPM can be built as a static module. Select a mpm at build time, linked to the server. If you want to change MPM, you must rebuild it. In order to use the specified MPM, use the parameter--with-mpm=name when executing the Configure script. Name is the specified MPM name. After the compilation is complete, you can use./httpd-l to determine the selected MPM. This command lists all modules that are compiled into the server program, including MPM.
(2) Build MPM as dynamic module
In UNIX or similar platforms, MPM can be built as a dynamic module and loaded at run time as with other dynamic modules. Building MPM as a dynamic module allows you to change the MPM by modifying the contents of the LoadModule directive without rebuilding the server program. Use the--enable-mpms-shared option to enable this feature when you execute a configure script. All MPM modules supported by this platform will be installed when the given parameter is all. You can also give a list of modules in the parameters. The default MPM, which can be automatically selected or specified by the--WITH-MPM option when the Configure script is executed, then appears in the generated server configuration file. Edit the loadmodule instruction content to select a different mpm.
httpd 2.4.9 + mysql-5.5.33 + php-5.4.26 compiling the installation process