Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux source code to install Apache and solutions to common errors     - Linux kernel likely and unlikely to resolve macro definitions (Linux)

- Using PHP MySQL library (Programming)

- Linux Disk and File Management (Linux)

- Shell command line operation (Linux)

- Linux operating system boot process analysis (Linux)

- Repair after installing Ubuntu no boot device error (Linux)

- using Docker Kitematic on windows (Linux)

- Android webView URL redirects affect goBack () (Programming)

- Use py2exe to generate exe files Python script (Programming)

- HttpClient4 usage upgrade from HttpClient3 (Programming)

- Android working with Volley Comments (Programming)

- Ubuntu development Nodejs (Linux)

- Linux install Samba file sharing server (Server)

- How to properly set up a Linux swap partition (Linux)

- Ruby and Python simple comparison (Programming)

- SecureCRT remote connection Ubuntu fails to solve the case (Linux)

- ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], [] (Database)

- Try the command ip, ifconfig is obsolete under Linux (Linux)

- 5 fast Node.js application performance tips (Programming)

- Log4j configuration file Explanation (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

#1#

/ 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

#2#

httpd: apr_sockaddr_info_get () failed for RedHat

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 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! ! !
     
         
         
         
  More:      
 
- Ubuntu 14.04 install Nmap 6.46.1 (Linux)
- Linux nice program origin of the name (Linux)
- MySQL monitoring tools -orzdba (Database)
- Oracle Data Guard LOG_ARCHIVE_DEST_n optional attribute parameters (Database)
- Java memory area and memory overflow exception (Programming)
- 64-bit Ubuntu 15.10 How to compile the latest version of the 32 Wine 1.7.53 (Linux)
- Linux security settings Basics (Linux)
- Linux modify the system time (Linux)
- Preps - Print within the specified range of IP addresses (Linux)
- Sublime Text 3 (Linux)
- Java Adapter Mode (Programming)
- Java in the inverter and covariance (Programming)
- RHEL 5.7 Yum configure local source [Errno 2] No such file or directory (Linux)
- Git common skills (Linux)
- Secondary exponential smoothing prediction method implemented in Python (Programming)
- Laravel 4 Expansion Pack (Server)
- Linux five security TIPS (Linux)
- Using VMware vSphere Client Linux virtual machine installation CentOS6.4 system (Linux)
- Solve ORA-01012: not logged on (Database)
- Linux Network Programming --IP packet format Detailed (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.