Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Linux source code to install Apache and solutions to common errors     - How to install GIMP 2.8.16 in Ubuntu 16.04,15.10,14.04 (Linux)

- Use top to monitor the remote server (Server)

- Linux static library generated Guide (Programming)

- Growth since Oracle set the table space (Database)

- CentOS 6.5 opens the Xmanager Remote Desktop login (Linux)

- Redis application of Sina Weibo (Database)

- Use of the storage-level replication technology will quickly clone a ASM database to the target environment (Database)

- ORA-00824: can not set sga_target due to existing problem-solving (Database)

- Modular JavaScript (Programming)

- Rails project prepared some tips small experience (Linux)

- GAMIT 10.50 installed in Ubuntu 12.04 system (Linux)

- Oracle 11g maintenance partitions - Adding Partitions (Database)

- Oracle Data Pump Example (Database)

- Bash command substitution (Programming)

- The minimum initial use of the Linux operating system RancherOS feelings (Linux)

- DataGuard Standby backup error RMAN-06820 ORA-17629 to solve (Database)

- Ubuntu install Eclipse for C / C ++ and related configuration (Linux)

- Monitor log file (listener.log) (Database)

- Spring MVC Exception Handling (Programming)

- Linux system versions organize local root password cracking method (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! ! !
- Summary Linux bond of multi-interface load balancing (Linux)
- To share Internet access through NAT mode under Virtual Linux VMware Workstation (Linux)
- Monitoring network traffic with Iptraf in Linux environment (Linux)
- Use dump restore mode fast backup and recovery system FreeBSD (Linux)
- Linux System Getting Started Tutorial: Installing Git on Linux (Linux)
- SQL Beginner Guide (Database)
- Using a proxy method under Linux terminal (Linux)
- Five strokes to find out the IP address you want to know (Linux)
- Python object-oriented programming (Programming)
- CentOS 6.5 boot automatically mount the hard drive (Linux)
- Use cmake to compile and install MySQL 5.5 (Database)
- Java recognize simple codes (Programming)
- Upgrade installation manual CentOS6.5 GCC4.8.2 (Linux)
- iostat command Detailed (Linux)
- Install the Red Hat Container Development Kit on OSX (Server)
- Linux command Detailed chpasswd bulk edit user password (Linux)
- Android official recommendation: DialogFragment create dialog (Programming)
- Ubuntu 14.04 LTS compiler installation R Source Code (Linux)
- Setting CentOS firewall open port (Linux)
- grep command usage (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.