CENTOS64bit安装前端开发环境

1.查看系统版本;
<pre>uname -a
Linux vm11060057 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux</pre>
<pre>head -n 1 /etc/issue
CentOS release 5.4 (Final)</pre>
2.安装apache2.2
1)下载httpd-2.2.21.tar.gz | apr-util-1.3.12.tar.gz|apr-1.4.5.tar.gz |pcre-8.12.tar.gz
2) tar -zxvf 解压对应压缩包。
3)到apache目录下 ,vi INSTALL</pre>
4)#./configure --prefix……检查编辑环境时出现:
checking for APR... no
configure: error: APR not found . Please read the documentation.
5)安装APR,cd apr-1.4.5
# ./configure
# make
# make install
6)再次编译出现该错误:configure: error: APR-util not found . Please read the documentation.
7)安装apr-util
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
# make
# make install
8)接着提示:configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
9)安装PCRE
# ./configure --prefix=/usr/local/pcre
# make
# make install
10)继续安装Apache/httpd,./configure 时加上参数 --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre;
11)安装完毕apache;
3.安装PHP 5.3.8
1)下载php-5.3.8.tar.gz,后tar -zxvf
# ./configure --prefix=/usr/ali/php --with-apxs2=/$APACHEPATH/bin/apxs --with-config-file-path=/$APACHEPATH/conf
# make
# make install
# make test
# make clean
# vi /$APACHEPATH/conf/httpd.conf
2)任意位置添加如下内容
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

4. 单独编译安装Apache rewrite_module
1)编译
# cd /modules/mappers
# /$APACHEPATH/bin/apxs -i -a -c ./mod_rewrite.c

5.配置对应虚拟目录和.htaccess
1)配置目录略
2)Options FollowSymLinks
AllowOverride None
改为
Options FollowSymLinks
AllowOverride All
打开
LoadModule rewrite_module modules/mod_rewrite.so

6.重启,可以正常访问。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值