Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Ubuntu 14.04 compile and install Apache     - Ubuntu 12.04 LTS installation configuration JDK1.6.0_45 (Linux)

- Ubuntu 14.04 installation and configuration environment variable JDK1.8.0_25 (Linux)

- 20 open source / commercial Linux server management control panel (Server)

- How to modify the Emacs Major Mode Shortcuts (Linux)

- Ubuntu install Oracle 10g process and problem solution (Linux)

- SSH does not require a password to log on to a Linux server (Server)

- Java thread lifecycle (Programming)

- BusyBox build root file system (Linux)

- Linux compiler of GCC (Linux)

- Element content of Java HashSet change issues (Programming)

- Hadoop scheduling availability of workflow platform - Oozie (Server)

- and localhost difference (Server)

- Use mdadm tool to create software RAID 0 (Linux)

- Linux System Getting Started Learning: the Linux Wireshark interface dead solve (Linux)

- Set multiple IP addresses for a single network card on Ubuntu 15.10 (Linux)

- The Concept and Semantics of Java Memory Model (Programming)

- About Python default character set (Linux)

- Comparison of one-time transaction and CTE insert data (Database)

- Linux file compression and file system packaged with instructions (Linux)

- Linux system man help tips (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.
- Linux and Windows virtual machine shared folders ---- Linux install VMware tools (Linux)
- Ubuntu prevent arp attacks (Linux)
- Oracle can not change the tablespace to backup mode in non-archive mode (Database)
- Upgrade to Node V4 seven reasons (Programming)
- To create someone else can not afford to delete the administrator user (Linux)
- Python format string (Programming)
- MongoDB 3.2 Cluster Setup (Database)
- MySQL group_con cat_max_Len (Database)
- Ubuntu manually set the DSL broadband connection (Linux)
- Configuring s3c-linux- appears Unable to find the QT3 installation (Linux)
- ORA-04091 and Compound Trigger (Oracle 11g) (Database)
- Java Cookie Comments (Programming)
- DataGuard a hardware issue warnings found (Database)
- CentOS installed JDK8 (Linux)
- Guide: Trickle restrict application bandwidth usage (Linux)
- Linux disk virtualization (Linux)
- The most concise Systemd tutorial, just ten minutes (Linux)
- Ubuntu rights management common commands (Linux)
- iptables allow only specific ip address to access the specified port (Linux)
- Save the database data files into Oracle Learning (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.