|
二、安装Apache2
代码:
因为PHP是安装在apache之上的,所以在安装PHP之前要现装APACHE,而MYSQL是什么时候安装都可以。
1解压缩
shell> tar zxvf httpd-2.2.2.tar.gz
shell> cd httpd-2.2.2
2配置安装
shell> ./configure --prefix=/usr/local/apache2 --enable-module=so --enable-module=rewrite --enable-shared=max
没有出现错误就 继续下一步
3编译安装
shell> make
没有出现错误就 继续下一步
shell> make install
没有出现错误就 继续下一步
4安装完成,测试
进入/usr/local/apache2(地2布指定的安装路径)
vim htdocs/index.html
随便写点东西
执行bin/apachectl start &
如果启动成功
打开浏览器浏览 http://127.0.0.1
如果看到你刚才些的东西,那么你的APACHE2安装成功了
按照上面的步骤装的时候在编译的时候出现错误
[root@localhost httpd-2.2.2]# ./configure --prefix=/usr/local/apache2 --enable-module=so --enable-module=rewrite --enable-shared=max
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
Configuring Apache Portable Runtime library ...
checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
Configuring APR library
Platform: i686-pc-linux-gnuoldld
checking for working mkdir -p... yes
APR Version: 1.2.7
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr
紧急求救 |
|