Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Linux source code to install Apache and solutions to common errors     - Oracle create user authorization and in PLSQL (Database)

- Findbugs installation documentation (Linux)

- C ++ two second pointer memory model (two-dimensional array) (Programming)

- Production Environment MongoDB Fragmentation and Cluster Solution (Database)

- Vim simple configuration (Linux)

- phpinfo (): like phpinfo as a Python script (Programming)

- Linux ./configure --prefix command (Linux)

- How to make Linux a non-root user uses less than 1024 ports (Linux)

- 17 How to install the Ubuntu 14.04 and Linux Mint Kodi14 (XBMC) (Linux)

- Linux environment variable settings methods and differences (Linux)

- Linux System Getting Started Learning: Linux in the last command (Linux)

- How do you know your public IP terminal in Linux (Linux)

- Add local search to your Android app (Programming)

- Run Windows in FreeBSD bhyve (Linux)

- CentOS 6.0 system security level (Linux)

- osprofiler use OpenStack Cinder Lane (Server)

- Python 3.5 await / async (Programming)

- Python basis: os module on the file / directory using methods commonly used functions (Programming)

- Talking about the shortcomings and deficiencies of the firewall (Linux)

- Deploy OpenStack Juno on Ubuntu 14.04 (Linux)

  Linux source code to install Apache and solutions to common errors
  Add Date : 2017-01-08      
  First, Linux compile and install apache

1, resolve dependencies

httpd-2.4.4 requires a newer version of the apr and apr-util, and therefore need to be upgraded in advance.

Upgrade There are two ways, one is through the source code compiler installation, a direct upgrade rpm package (carefully! Carefully). Here is the way the line of source code, they download path is: (~ _ ~) here no longer comes there to download, I believe you have the ability to find, Oh

2. Install dependent packages (of course this can be considered as the required build environment slightly!)

yum -y install pcre-devel

yum -y install "Development Libraries" (this thing may already have the system, but be careful, it is best to try to see if installed)

3, then everything is ready to start the installation now! !

(1) compile and install apr

tar xf apr-1.4.6.tar.bz2

cd apr-1.4.6

./configure --prefix = / usr / local / apr

make && make install

(2) compile and install apr-util

tar xf apr-util-1.5.2.tar.bz2

cd apr-util-1.5.2

./configure --prefix = / usr / local / apr-util --with-apr = / usr / local / apr

make && make install

(3) compile and install httpd-2.4.4

tar xf httpd-2.4.4.tar.bz2

cd httpd-2.4.4

./configure --prefix = / usr / local / apache --sysconfdir = / etc / httpd --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-mods-shared = most --enable-mpms -shared = most --with-mpm = event

make && make install

Second, the test

1, when you start apache attention to the problem:

Before you start Note that SELinux should first be closed, if not closed, then apache may not work properly, the good thing is about iptables (firewall) problems, we recommend testing phase prior to shut down.

2, start the apache service:

# Setenforce 0

# Service iptables stop

# / Usr / local / apache / bin / apachectl start

Open your browser and enter the local ip to see if there are pages flushed out and show

It works!

So apache service can simply work!

To have more features that can modify the httpd.conf configuration file it! ! (Where they would not be introduced)

Third, some of the questions about apache file directory

1. After the RPM installation Apache configuration file specific location:

/ Etc / httpd / -------------------------- Apache root directory services

/etc/httpd/conf/httpd.conf --------- master configuration file

/ Var / www / html --------------------- default page document root directory

/ Var / log / httpd / error_log ---------- error log file

/ Var / log / httpd / access_log -------- access log file

2, the source installation directory files (file directory is uncertain because the compiler so I simply write about the whole thing):

---------------------- Path of the primary configuration file when compiling their own specific configuration files directory --prefix =

------------------- Default installation directory page directory apache htdocs directory

------------------- Install log file location directory apache logs directory

Apache directory service program ---------- installation directory under the bin directory apache

Fourth, common errors


/ Usr / local / apache / bin / httpd: symbol lookup error: / usr / local / apache / bin / httpd: undefined symbol: apr_pool_pre_cleanup_register

Cause: find the right apr, apr-util path

Resolution: To reinstall apr, apr-util, and write the correct file path.

--with-apr = / usr / local / bin / apr-1-config \

--with-apr-util = / usr / local / apr / bin / apu-1-config


httpd: apr_sockaddr_info_get () failed for RedHat

httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName

Reason: httpd.conf configuration file ServerName with the host lead to inconsistent

Solution: Modify the configuration file httpd.conf to #ServerName

# 3 #

httpd: Syntax error on line 142 of /usr/local/apache/conf/httpd.conf: Can not load modules / mod_dir.so into server: /usr/local/apache/modules/mod_dir.so: undefined symbol: apr_array_clear

Reason: can not load mod_dir.so module (specifically unknown)

Solution: as follows

tar -zxvf apr-1.4.6.tar.gz

tar -zxvf apr-util-1.5.2.tar.gz

mv ./apr-1.4.6 / usr / local / src / apache / srclib / apr

mv ./apr-util-1.5.2 / usr / local / src / srclib / apr-util

When ./configure, add back

--with-included-apr \

--with-pcre = / usr / local / bin / pcre-config

Because it is not what is written, and in front of the content is not specific modifications, so the inconvenience hope of understanding! ! !
- Log in CentOS 6.5 Multi-user setting VNC (Server)
- ARM runtime environment built from scratch using QEMU emulator (Linux)
- Create the container and run the application Docker (Server)
- Android View event delivery (Programming)
- The ORA-01113 error is handled with BBED without archiving (Database)
- Linux security configuration (Linux)
- findmnt- Looking mounted file system (Linux)
- Linux install Eclipse for C / C ++ Development (Linux)
- Python when automated operation and maintenance often used method (Programming)
- VMware virtual machine to install CentOS 7 (Linux)
- Java framework for parallel study - ForkJoin (Programming)
- Android Studio Clear Project or Rebuild Project Error (Linux)
- How to deploy Icinga server (Server)
- How to build Memcached Docker container (Server)
- Java exception handling mechanism (Programming)
- AngularJS application unit testing started (Programming)
- Java reflection by calling the class method (Programming)
- Linux Security Module (LSM) Introduction (Linux)
- Articles do not resolve after opening under Ubuntu WordPress setting a fixed link (Server)
- Ubuntu method for single-card dual-IP (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.