Centos5.4 install apache

Source: Internet
Author: User

Because it was not installed last time, centos was uninstalled and re-installed this afternoon. After the system is installed, PHP and other applications are not installed first. The installation of apache started directly, but it was not successful for the first time.
Check the error message. We can see that a GCC is not installed, So we installed GCC with YUM.
Yum install gcc
And then reinstall apache!
CentOS Apache installation is still quite common, so I have studied how to install CentOS Apache. Here I will share it with you and hope it will be useful to you. CentOS is a community of Open Source Software contributors and users. The following describes how to install CentOS Apache.
1. Download: apache2.2.4
[Root @ localhost ~] # Cd/usr/local/src/
[Root @ localhost src] # wget
Http://archive.apache.org/dist/httpd/httpd-2.2.4.tar.gz
[Root @ localhost src] # chmod + x httpd-2.2.4.tar.gz
[Root @ localhost src] # tar-zxvf httpd-2.2.4.tar.gz
2. Install CentOS Apache and set compiler compilation Parameters
[Root @ localhost src] # cd httpd-2.2.4
[Root @ localhost httpd-2.2.4] #. /configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite = share -- enable-proxy-ajp = share -- enable-dav = share -- enable-dav-fs
# Note:
-- Prefix =/usr/local/apache2
Set the CentOS Apache installation directory. Here, it is set to be installed in/usr/local/apache2. If you want to uninstall or upgrade CentOS Apache in the future, you can directly Delete this directory.
-- Enable-so
Specify to allow DSO (dynamic sharing of images)
-- Enable-rewrite = share
Enable Rewrite to achieve URL static. We recommend that you enable this feature.
-- Enable-dav-fs
Enable WebDAV support and svn server. Appendix: What is webDAV? And how to apply it?
For other additional settings, use./configure -- help.
3. Install and compile CentOS Apache:
[Root @ localhost httpd-2.2.4] # make; make install
# If no error occurs, Apache is installed in the/usr/local/apache2 directory.
4. Start the service:
[Root @ localhost httpd-2.2.4] #/usr/local/apache2/bin/apachectl start
5. Determine the startup status:
[Root @ localhost apache2] # netstat-utl
# If you see this line, your CentOS Apache has been started.
# Access It works in a browser !, It indicates that CentOS Apache is successfully installed. Congratulations!
 

This article is from "Thinking"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.