Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Ubuntu 14.04 compile and install Apache     - To execute the cp command prompt type skip folder under CentOS (Linux)

- Ubuntu 14.04 installed NVIDIA graphics driver (Linux)

- Linux performance optimization tools perf top (Linux)

- Verify the character set on MyCAT (Database)

- The best known for archiving / compression tool under linux (Linux)

- To configure linux transparent firewall (Linux)

- Oracle 10046 Event (Database)

- CentOS 5.5 kernel upgrade installation iftop (Linux)

- Install apr support for Tomcat on Linux (Server)

- Linux user status query, and to unlock locked user (Linux)

- Linux Shell introduces (Linux)

- Ubuntu Locale configuration problem solving Can not set LC_CTYPE (Linux)

- RCU lock in the evolution of the Linux kernel (Linux)

- To install Xen in Ubuntu 12.04 (Linux)

- CentOS 6.4 (64bit) install Python 2.7.5 (Linux)

- Firewall - Internet Militarization (Linux)

- Dynamic programming Android (Programming)

- Seven Steps to Help Google Chrome Speed - (Linux)

- Turning off the interface eth0: error: Disconnect the device 'eth0' (Linux)

- How Linux system password security guarantee (Linux)

  Ubuntu 14.04 compile and install Apache
  Add Date : 2018-11-21      
  Ubuntu install apache compiler need to install multiple dependent precompiled device comprising: apr, apr-util, pcre, zlib-devel, etc., it is quite troublesome to record this for future reference.

Since Ubuntu system is not installed by default when you install C ++, so you need to install c ++ compiler needs related components.

[Note] apt-cache policy package names // View Installed package information.
Installation steps:

1, first install the c ++ compiler-related components:

Just packed Ubuntu systems have GCC, but the GCC what documents are not translated, because without some necessary header files, so you want to install the build-essential package, the installation of this package will be automatically installed on g ++, libc6 -dev, linux-libc-dev, libstdc ++ 6-4.1-dev and some other necessary software libraries and header files.

Install the required packages:

sudo apt-get install build-essential

2, compiled and installed APR

(1) download apr: Address: http: //mirror.esocc.com/apache/apr/

Storage location: /usr/local/src/apr-1.5.1.tar.gz

(2) #cd / usr / local / src

(3) #tar -zxvf apr-1.5.1.tar.gz

(4) #cd apr-1.5.1

(5) #. / Configure -prefix = / usr / local / apr

(6) #make

(7) #make install

3, and then compile and install apr-util, similar to the previous step to install apr

(1) download apr-util: Address with apr: http: //mirror.esocc.com/apache/apr/

Storage location: /usr/local/src/apr-util-1.5.3.tar.gz

(2) #cd / usr / local / src

(3) #tar -zxvf apr-util-1.5.3.tar.gz

(4) #cd apr-util-1.5.3

(5) #. / Configure -prefix = / usr / local / apr-util --with-apr = / usr / local / apr // here put apr installation path

(6) #make

(7) #make install

4, and then compile and install pcre

(1) download pcre: Address: http: //sourceforge.net/projects/pcre/files/pcre/

Storage location: /usr/local/src/pcre-8.35.tar.gz

(2) #cd / usr / local / src

(3) #tar -zxvf pcre-8.35.tar.gz

(4) #cd pcre-8.35

(5) #. / Configure -prefix = / usr / local / pcre

(6) #make

(7) #make install

5, install zlib-devel

# Apt-get install zlib1g-dev

// Zlib-devel is a RedHat / Fedora name, zlib1g-dev and libz-dev are the Debian / Ubuntu names (zlib1g-dev provides libz-dev which is a virtual package).


(1) Download zlib: Address: http: //sourceforge.net/projects/libpng/files/zlib/

Storage address: / home / xxx / Downloads

#cp /home/xxx/Downloads/zlib-1.2.8.tar.gz / usr / local / src

#cd / usr / local / src

#tar -zxvf zlib-1.2.8.tar.gz

#cd zlib-1.2.8

#. / Configure -prefix = / usr / local / zlib

#make && make install

6, and finally compile and install apache

(1) download apache, address: http: //httpd.apache.org/download.cgi

Storage location: / home / xxx / Downloads

#cd / home / xxx / Downloads

#cp httpd-2.4.9.tar.gz / usr / local / src

#cd / usr / local / src

#tar -zxvf httpd-2.4.9.tar.gz // decompression

#cd httpd-2.4.9

#. / Configure -prefix = / usr / local / apache2 --enable-deflate --enable-expires --enable-headers --enable-modules = most --enable-so --with-mpm = worker --enable -rewrite --with-apr = / usr / local / apr --with-apr-util = / usr / local / apr-util --with-pcre = / usr / local / pcre

#echo $? // Check for errors

# 0 // return 0 no problem


#make install

The above ./cofigure next parameter:

# --prefix = < Install_Path > specified compiled binary files are installed to < Install_Path > directory, replaced with the actual installation path < Install_Path >, such as --prefix = / usr / local / apache-2.4.9, if you omit this configuration parameters, installed by default to / usr / local / apache2.

# --enable-So specified compiled dynamically loaded modules (DSO) support to the httpd binary, so that each module can function module Apache core separately compiled, dynamically loaded at runtime. With the DSO support, upgrades and additional modules can only compile the modules without having to recompile the entire system. The latest version of this module is to compile Apache default httpd binary file, if you are using an earlier version of apache DSO and need support, you may want to clear that option.

# --enable-Mods-shared = < MODULE-LIST > To clearly indicate DSO compiled modules, < MODULE-LIST > is a space separated list of modules, all, or most, all represented include all modules, most expressed comprising most modules, such as --enable-mods-share = "rewritedeflate", - enable-mods-share = most, the effect is equivalent to more than --enable- < FEATURE > = share

# - With-mpm = < MPM > to select Apache Multi-Processing Module, = {beos | mpmt_os2 event | worker | | prefork} default, prefork Unix system is under processing module, it will run a non-threaded the pre-derived Web server, not suitable for thread-safe libraries, the need to avoid threading system compatibility issues, it is requested that each request independently under the best circumstances MPM, if such a request would not be a problem affect other requests. worker support hybrid multi-threaded multi-process multi-channel processing module, due to the use of threads to handle requests, so it can handle massive requests, and system resources is less than the cost of process-based MPM, at the same time, it also uses a number of processes, each processes have multiple threads to obtain the stability of the process-based MPM. If your system is based on thread-safe, then I recommend the use of worker replacement prefork, it makes you get the actual system performance improvement.
- Hands to teach you to solve Ubuntu error message (Linux)
- AngularJS notes --- Scope and controller (Programming)
- Linux FAQ - How to fix tar:Exitingwith failure status due to previous errors (Linux)
- Ubuntu How to mount iso file (Linux)
- CentOS 7.0 running Docker kernel error solution (Server)
- Redmine Installation (Linux)
- GNU Linux use diff to generate a patch with the patch (Linux)
- An Analysis of the C Algorithm for Calculating the Number of Days Between Date (Programming)
- Ubuntu 12.04 kernel configuration automatically restart and crash dump (Linux)
- Linux common network tools: traceroute routing of scanned (Linux)
- Computer security perimeter recommendations (Linux)
- Linux FTP setting file description (Server)
- VirtualBox 4.3 Can not open a new task for a virtual computer solution (Linux)
- Command line tool Tmux (Linux)
- Install Xshell on Mac OS X (Linux)
- How to add two-factor authentication for Linux systems SSH (Linux)
- Linux platform host to prevent hacking skills (Linux)
- Ubuntu ADSL dial-up Internet access (Linux)
- How to install Ubuntu California - the calendar application (Linux)
- Quick Install software RAID on Linux (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.