Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Ubuntu 14.04 compile and install Apache     - 10 useful tools for Linux users (Linux)

- Linux installation and error under codeblocks exclude [Ubuntu 10.04] (Linux)

- Use ARChon runtime environment to run Android apps on Ubuntu (Linux)

- MongoDB, Cassandra, HBase transaction design strategy (Database)

- NIC configuration parameters under Linux (Linux)

- Common data structures and functions of Linux process scheduling (Programming)

- Java memory area Explanation (Programming)

- In-depth summary of the PHP core of object-oriented (Programming)

- Use Tmux and Vim to make IDE (Linux)

- Fedora 21 setting boot script (Linux)

- installation of Vim plugin YouCompleteMe under Ubuntu 15.04 (Linux)

- How to install Docker and basic usage on Ubuntu 15.04 (Server)

- How to Install SeaMonkey 2.25 for Ubuntu (Linux)

- MongoDB uses aggregate, group, match mysql achieve in having (count (1)> 1) features (Database)

- Python Socket Network Programming (Programming)

- Configuring a Linux operating system against syn attack (Linux)

- Linux iostat command example explanation (Linux)

- How to create a remote (Linux)

- Depth understanding of DB2 table space (Tablespace) (Database)

- Parse Server supports iOS and Android push messaging (Programming)

  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.
- Ubuntu Series Installation Docker (Linux)
- Availability Hadoop platform - Oozie Workflow (Server)
- Java NIO in the world (Programming)
- Bootable ISO image using GRUB (Linux)
- Linux shell script under the use of randomly generated passwords (Programming)
- Profile Linux users login shell and login to read (Linux)
- Use apt-p2p up a local Debian package cache (Server)
- VPS xen openvz kvm (Server)
- How to cool down your Ubuntu system (Linux)
- Linux system network security tools sudo Introduction (Linux)
- Redhat 7 can only be read after installation Samba service catalog approach could not be written (Server)
- Ubuntu Apache virtual host configuration (Server)
- Linux --- process handle limit summary (Linux)
- Laravel configuration PhpStorm + Xdebug + Chrome settings Debug Environment (Server)
- To compile and install Clang 3.5.0 in Linux CentOS (Linux)
- User and user group management Linux Command (Linux)
- JBPM6 Tutorial - taught you how to install JBPM (Linux)
- MySQL script incremental backups (innobackupex) (Database)
- Oracle inverted reverse function (Database)
- The difference between free command displays the buffers and cache (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.