Because we have tried to install apatce before, we checked whether httpd has been installed and its version number before the installation.
The following describes how to query information about the installed RPM software:
Here, I will first check whether httpd and MySQL are successfully installed:
$ Rpm-Qi httpd & lt; = httpd & gt; display installed
$ Rpm-Qi MySQL "= MySQL" indicates that it has been installed
Forget it. In order to practice technology and take notes. I unmount all of them and reinstall them:
(Software installation and uninstall Reference documents: http://www.cnblogs.com/propheteia/archive/2012/06/26/2563383.html)
Uninstalling MySQL is simple:
(1): first, the Administrator identity: su
(2): run the command: rpm-e MySQL "=" uninstalled successfully ".
However, it was found that the failure: Error: Failed dependencies: httpd-Mmn = 200w.15-x86-32 is needed by (installed) php-5.4.7-10.fc17.i686 was directly used: rpm-e httpd = uninstall httpd
The meaning is probably: unable to lift the dependency: The httpd-20051115-X86-32 of MMN is (installed) The php-5.4.7-10.fc17.i686 needs ,.......... Maybe I have installed PHP last time. Therefore, the dependency cannot be detached.
Okay. First, the same method: rpm-e PHP "= uninstall PHP
Then uninstall httpd: rpm-e httpd "=" succeeded.
It's far away ..................
1. reinstall the environment and run the following command:
Simple installation method: (YUM installation)
1. # Yum install httpd
2. # Yum install MySQL
3. # Yum install PHP (I have never been a user)
If the source code is installed:
Httpd source code Installation
Download the source code package. You can select httpd-2.4.3.tar.gz?httpd-2.4.3.tar.bz2. (Of course, you can download it directly from this URL)
2. decompress:
(1) Put the compressed package in the/home/tmp file first (mkdir can be created without it)
(2) GZ format: # tar-zxv-F httpd-2.4.3.tar.gz
Bz2 format: # tar-jxv-F http-2.4.3.tar.bz2
After decompression, a folder for the http-2.4.3 is generated under the TMP folder
His content is roughly as follows:
Generally, configuar is the script to be executed.
In addition, you must note that many installation packages have an install .!!!!!!!!!!!!!!
We can cat install | more, and we will find that the content in it is the installation steps and how to start apatch.
I believe that everyone's English is better than mine. Haha. Certainly can understand. Not much.
3. Generate:
Now, execute configure in the current directory. (You can use #./configure -- help. View its help information. But a lot. We usually use "-- prefix" to define the installation path, because the uninstallation of the source code package usually only needs to delete the file package. If you specify the file path, it will be installed in the default path, so it will be very troublesome to uninstall. In addition, it will be convenient to specify the path when you want to start his role)
Installation command: #. Configure -- prefix =/usr/local/apatch "=" I installed in the/usr/local/apatch path"
Okay. Error:
-
Zookeeper --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
What to do. Search on the Internet: Refer to blog (http://www.cnblogs.com/huzhiwei/archive/2012/07/19/2599854.html and http://www.linuxso.com/linuxrumen/27220.html)
Solution:
(1) run the command: #./configure-help | grep APR = to view help information
(2) install APR (Apache Portable Runtime) :( source package: http://labs.mop.com/apache-mirror//apr)
[Root @ localhost ~] # Cd/tmp/= source code storage location
[Root @ localhost 52 Lamp] # tar-zxv-F apr-1.4.6.tar.gz = Extract
[Root @ localhost 52 Lamp] # cd apr-1.4.6
[Root @ localhost apr-1.4.2] #./configure -- prefix =/usr/local/APR '= solve the following problem.
[Root @ localhost apr-1.4.2] # Make
[Root @ localhost apr-1.4.2] # make install
----------------------------------------------------------- Another problem occurs -----------------------------------------------------------
Do not forget the steps # Make & make install. That's why I forgot this. The following error occurs:
When you install Apr-uitl:./configure -- prefix =/usr/local/APR = util -- With-Apr =/usr/local/APR
Will appear: checking for APR... configure: Error: The -- With-Apr parameter is incorrect. it must specify an install prefix, a build directory, or an APR-config file. error
Of course, only me will have such a low-level error.
------------------------------------------------------------- Problem Solving -------------------------------------------------------------
(3) then install Apr-util :( source package: http://labs.mop.com/apache-mirror//apr)
Run #./configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR
Then: # Make & make install
(4) There is a last step: Install PCRE (Regular Expression Library) (source package: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre)
Decompress =./configure =. Make & make install
The command line is as follows:
# Tar-jxv-F pcre-8.31.tar.bz2
# Cd pcre-8.31/
#./Configure -- prefix =/usr/local/PCRE
# Make & make install
(5) Okay. Everything is OK. Continue to install Apache/httpd, but remember:
&: Add the parameter -- With-PCRE =/usr/local/PCRE to./configure.
&: Add -- enable-module = so to make Apache support DSO.
(If the task is not executed at the beginning, run the following command again :#. /configure -- prefix =/usr/local/PCRE -- enable-module = So =, make & make install can also achieve the same effect)
Zookeeper ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4. Compile and install: # Make & make install)
Okay. So far. Apache has been installed and configured successfully.
Reference blog: http://www.knowsky.com/2875.html
Install MySQL and PHP tomorrow. Go back to bed.