Centos66 install apache24

WBOY
Release: 2016-07-29 09:07:30
Original
1345 people have browsed it

Installing the following packages requires gcc, please install gcc yum install gcc

1. Install apr-1.5.1.tar.gz

[plain] view plaincopy

  1. tar -zxvf apr-1.5.1.tar.gz
  2. cd apr-1.5.1
  3. ./configure --prefix=/usr/local/apr
  4. make
  5. make install
2. Install apr-util-1.5.4.tar.gz

[html] view plaincopy

  1. tar -zxvf apr-util-1.5.4.tar.gz
  2. cd apr-util-1.5.4
  3. ./configure --with-apr=/usr/ local/apr
  4. make
  5. make install
3. Install pcre-8.36.tar.gz

[plain] view plaincopy

  1. tar -zxvf pcre-8.36.tar.gz
  2. cd pcre-8.36
  3. ./configure --prefix=/usr/local/pcre
  4. make
  5. make install
4. Install httpd-2.4.10.tar.gz

[plain] view plaincopy

  1. tar -zxvf httpd-2.4.10.tar.gz
  2. cd httpd-2.4.10
  3. ./configure --prefix=/usr/local/apache --with-apr= /usr/local/apr/ --with-pcre=/usr/local/pcre/
  4. make
  5. make install
5. Modify /usr/local/apache/conf/httpd. conf

Find #ServerName www.example.com:80 and change it to ServerName localhost:80

6. Add http to service

[plain] view plaincopy

  1. cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
7. Modify /etc/rc.d/init.d/httpd

Add

[plain] view plaincopy under #!/bin/bash

  1. # chkconfig: 2345 50 90
  2. # description:Activates/Deactivates Apache Web Server)
8. Start apache

[html] view plaincopy

  1. service httpd start
9. Verify whether apache starts successfully

[plain] view plaincopy

  1. lsof -i:80

The following output proves that apache is started

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 4158 root 4u IPv6 50349 0t0 TCP *:http ( LISTEN)
httpd 4159 daemon 4u IPv6 50349 0t0 TCP *:http (LISTEN)
httpd 4160 daemon 4u IPv6 50349 0t0 TCP *:http (LISTEN)
httpd 4161 daemon 4u IPv6 50349 0t0 TCP *:http (LISTEN)

The above introduces the installation of apache24 on Centos66, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template