1. Upload the httpd-2.4.10.tar.gz to the/OPT directory
2.TAR–ZXVF httpd-2.4.10.tar.gz
3. Enter the httpd-2.4.10 directory
3.1./configure--prefix=/usr/local/apache2--enable-cache--enable-disk-cache-enable-mem-cache--enable-file-cache --with-ssl--enable-ssl--enable-so--enable-mime-magic--enable-mods-shared=most--with-mpm=worker--with-apr-util= /usr/local/apr-util--with-pcre=/usr/local/pcre/
#--prefix=<install_path> indicates that the compiled binaries are installed in the <Install_Path> directory, replacing the <INSTALL_PATH> with the actual installation path; such as--prefix=/usr/local/apache-2.2.15, if this configuration parameter is omitted, it is installed to the/usr/local/apache2 directory by default.
#--enable-so indicates that the compiled dynamic load module (DSO) supports the httpd binary file, which enables the Apache modules to be compiled separately from the core and dynamically loaded at runtime. With DSO support, upgrading and adding modules requires only compiling the relevant modules, without recompiling the entire system. The latest version of Apache compiles this module to httpd binaries by default, and if you are using an earlier version of Apache and need DSO support, you may want to explicitly indicate this option.
#--enable-mods-shared=<module-list> explicitly indicate that the module to be compiled by DSO,<module-list> is a space-delimited list of module names, all or most, All means that all modules are included, most of which contain most of the modules, such as--enable-mods-share= "rewrite deflate",--enable-mods-share=most, the effect is equivalent to multiple--enable-< Feature>=share
#--with-mpm=<mpm> the Apache multi-path processing module, <MPM>={BEOS|EVENT|WORKER|PREFORK|MPMT_OS2}, Prefork is the default processing module for UNIX systems, which will run a non-threaded, pre-derived Web server that is suitable for systems that do not have a thread-safe library and need to avoid thread-compatibility issues, and it is the best mpm that requires each request to be independent of each other. This will not affect other requests if one of the requests fails. The worker is a multi-threaded multi-process module that supports mixed multithreading, because the threads are used to process requests, and the overhead of system resources is less than the process-based MPM, and it uses multiple processes, each with multiple threads, to obtain the stability of the process-based MPM. If your system is thread-safe, then I recommend using a worker instead of prefork, which will give your system real performance improvements.
3.2 Installing with something:
3.2.1 Apr (apr-util required with)
TAR–ZXVF apr-1.4.6.tar.gz
Enter the APR directory
./configure--PREFIX=/USR/LOCAL/APR
Make
Make install
3.2.2 Apr-util
TAR–ZXVF apr-util-1.5.2.tar.gz
Enter the apr-util-1.5.2 directory
./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR
Make
Make install
3.2.3 Pcre
TAR–ZXVF pcre-8.21.tar.gz
Enter the pcre-8.21 directory
./configure--prefix=/usr/local/pcre "Configure:error:You need a C + + compiler for C + + support. FIX: Yum-y install gcc-c++"
Make
Make install
4 return to the httpd-2.4.10 directory make
5 Return to the httpd-2.4.10 directory make install
Errors that occurred before:
Did not find the clue, and then did again, finishing the above steps!
Thank you: http://www.cnblogs.com/alexqdh/archive/2012/11/20/2764810.html
Linux compiled and installed Apache