安裝以下包裝需要gcc,請安裝gcc yum install gcc
1.安裝apr-1.5.1.tar.gz
[plain] p
- tar -zxvf apr-1.5.1.tar.gz
- cd apr-1.5.15
- make
- make install
- 2.安裝apr-util-1.5.4.tar.gz
[html]
tar -zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4 - =/usr/ local/apr
- make
-
make install view plaincopy
tar -zxvf pcre-8.36.tar.gz cd pcre-8.36
make
make install
4.安裝httpd-2.4.10.tar.gz
- [plain] view plaincopy
-
tar -zxvf httpd-2.4.10.tar.gz
-
cd httpd-2.4.10
- cd httpd-2.4.10
cd httpd-2.4.10 ache
cd httpd-2.4.10 ache
cd with-apr= /usr/local/apr/ --with-pcre=/usr/local/pcre/
make
-
make conf
- 找到#ServerName www.example.com:80修改為ServerName localhost:806.將http加入service
[plain] view
- cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
7.修改/etc/rc./
在#!/bin/bash下加入
[plain]
view plaincopy
# chkconfig: 2345 50 90
-
# description:Activates/Deactivates Apache Web# description:Activates/Deactivates Apache Web
# description:Activates/Deactivates Apache Web
[html]
view plaincopy
service httpd start
- 9.核實apache是否啟動成功view
view-
lsof -i:80
出現如下輸出則證明apache啟動COMMAND PID USER USER 4158 root 4u IPv6 50349 0t0 TCP *:http ( LISTEN)
httpd 4159 daemon 4u IPv6 50349 0t0 TCP *:http (LISTEN)- . 0t0 TCP *:http (LISTEN)
httpd 4161 daemon 4u IPv6 50349 0t0 TCP:http TCP:http (LISTEN)
以上就介紹了Centos66安裝apache24,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。