Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux source code to install Apache and solutions to common errors     - Understanding the Linux load average on other UNIX-Like systems (Linux)

- Linux kernel modules related to the management Comments (Linux)

- Configuring ftp server and nfs server under Linux (Server)

- Limit the use of the request being Nginx Flood attack (Linux)

- Export error: ORA-04063: package body dmsys dbms dm model exp has error (Database)

- To use Java arrays implement the order form (Programming)

- CentOS 7 version how to achieve the power to start the graphical interface (Linux)

- Setting CentOS firewall open port (Linux)

- Chkconfig command Detailed service is added and shut down the system in two ways to start service under Linux (Linux)

- Java memory analysis tool uses detailed MAT (Programming)

- Linux dd command applies amplification SWAP partition (Linux)

- Easily create RPM packages using the FPM (Linux)

- installation of Piwik under Ubuntu (Programming)

- CentOS 6.6 permanent method to modify the DNS address (Linux)

- Java development environment to build under Ubuntu (Linux)

- How to add a new resolution VirtualBox (Linux)

- Android custom title bar (Programming)

- Linux user login ban (Linux)

- Use Markdown editor for document work under Linux (Linux)

- Ubuntu 10.10 install Oracle 10g graphic tutorials (Database)

 
         
  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:      
 
- Linux use iptables ban Ping (Linux)
- REDO LOG records management (Database)
- Oracle Database routine inspection (Database)
- How to install Eclipse Luna IDE on CentOS 7 / RHEL 7 (Linux)
- Linux server alarms using Java (Server)
- Ubuntu Learning Advanced article - to teach you to further enhance system security (Linux)
- Python MySQL database connection (Database)
- C language function pointer and a callback function (Programming)
- Linux System Getting Started Tutorial: Using the Linux common commands (Linux)
- Oracle table space create large files (Database)
- C ++ 11 smart pointers (Programming)
- Oracle11g build physical standby database (Database)
- Approach the next Linux shared interrupts (Linux)
- Linux check disk parameters trapping lack amendments (Linux)
- C ++ free store and heap (Programming)
- Gitblit adopted Ticket collaborative development model (Linux)
- Linux common commands MEMO (Linux)
- The headers for the current running kernel were not found when VirtualBox installation enhancements (Linux)
- C + + secondary pointer memory model (pointer array) (Programming)
- C language programming entry - Common operators (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.