Centos66安装apache24
程序员文章站
2022-04-01 21:57:31
...
安装以下包需要gcc,请安装gcc yum install gcc
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)
1.安装apr-1.5.1.tar.gz
[plain] view plaincopy
- tar -zxvf apr-1.5.1.tar.gz
- cd apr-1.5.1
- ./configure --prefix=/usr/local/apr
- make
- make install
[html] view plaincopy
- tar -zxvf apr-util-1.5.4.tar.gz
- cd apr-util-1.5.4
- ./configure --with-apr=/usr/local/apr
- make
- make install
[plain] view plaincopy
- tar -zxvf pcre-8.36.tar.gz
- cd pcre-8.36
- ./configure --prefix=/usr/local/pcre
- make
- make install
[plain] view plaincopy
- tar -zxvf httpd-2.4.10.tar.gz
- cd httpd-2.4.10
- ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/ --with-pcre=/usr/local/pcre/
- make
- make install
找到#ServerName www.example.com:80修改为ServerName localhost:80
6.将http加入service
[plain] view plaincopy
- cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
在#!/bin/bash下加入
[plain] view plaincopy
- # chkconfig: 2345 50 90
- # description:Activates/Deactivates Apache Web Server)
[html] view plaincopy
- service httpd start
[plain] view plaincopy
- lsof -i:80
出现如下输出则证明apache启动
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEhttpd 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)
以上就介绍了Centos66安装apache24,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
上一篇: php查询分页代码
下一篇: ThinkPHP实现附件上传功能