Apache 安装
1,安装 apr
下载地址:http://apr.apache.org/download.cgi
[root@ubuntu:/work/soft/apache]# tar jxvf apr-1.5.0.tar.bz2
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# ./configure --prefix=/work/installed/apr
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make install
2,安装 apr-util
下载地址:http://apr.apache.org/download.cgi
[root@ubuntu:/work/soft/apache]# tar jxvf apr-util-1.5.3.tar.bz2
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# ./configure --prefix=/work/installed/apr-util --with-apr=/work/installed/apr
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make install
3,安装 pcre
下载地址:http://pcre.org/
[root@ubuntu:/work/soft/apache]# tar jxvf pcre-8.35.tar.bz2
[root@@ubuntu:/work/soft/apache/pcre-8.35]# ./configure --prefix=/work/installed/pcre
[root@@ubuntu:/work/soft/apache/pcre-8.35]# make
[root@@ubuntu:/work/soft/apache/pcre-8.35]# make install
注意:如果在安装 pcre 时,遇到问题:configure: error: You need a C++ compiler for C++ support.
解决方法:sudo apt-get install build-essential
二,安装apache
下载地址:http://httpd.apache.org/
[root@ubuntu:/work/soft/apache]# tar jxvf httpd-2.4.9.tar.bz2
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# ./configure --prefix=/work/installed/apache --with-apr=/work/installed/apr --with-apr-util=/work/installed/apr-util --with-pcre=/work/installed/pcre
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make install
三,配置
1,修改配置文件
否则会出现问题:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
解决方法:
[root@ubuntu:/work/installed/apache]# sudo gedit conf/httpd.conf
把:
# ServerName www.example.com:80
改为:
ServerName localhost:80
2,启动
[root@ubuntu:/work/installed/apache]# ./bin/apachectl start
配置CGI:
DocumentRoot "/work/installed/apache/htdocs"
<Directory "/work/installed/apache/htdocs">
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Require all granted
</Directory>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/work/installed/apache/cgi-bin/"
</IfModule>
<Directory "/work/installed/apache/cgi-bin">
Require all granted
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
- CENTOS 5.5安装APACHE+PHP5.5
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- apache 安装配置 以及php-fpm结合apache配置
- windows+apache2.2.14+php5.3.1+mysql5.1安装配置
- win7 安装apache时提示failed to open the winNT service manager
- [转]linux+php5.1.6+mysql5.0.2+apache2.0.55安装配置说明
- Linux安装配置php+apache
- centos 安装apache
- 安装apache需要的组件
- 终于把mysql、apache、php给安装好了
- apache安装配置说明1
- Ubuntu下使用源代码编译安装apache2.2.26
- LAMP架构——Apache(httpd)-2.4.29源码安装
- apache && jboss安装
- 安装Apache2.2.9,JK1.2,TOMCAT5.5集成作负载均衡
- Apache安装
- ubuntu 配置shh远程登录 安装php、apache
- 源码安装apache
- Ubuntu 安装LAMP(Linux,Apache,MySQL,PHP)
- Linux下Apache安装/增加mod_rewrite模块