thttpd+php(cgi) for arm-linux

1. 首先去官网下载一个php,现在我用的php版本是5.5.34.
1.1 编译php & 安装php
# tar -xvf php-5.5.34.tar.gz
# cd php-5.5.34
#CC=arm-hisiv200-linux-gcc ./configure --prefix=/user/php --disable-all --host=arm-linux --with-thttpd=/user/thttpd-2.21b
#make & make install
1.2 为什么需要--with-thttpd-2.21b呢?
原因是 thttpd需要关联到php,使之支持php

2. 编译thttpd-2.21b及安装
# CC=arm-hisiv200-linux-gcc ./configure --prefix=/user/thttpd --host=arm-linux
#make & make install
在make install 之前你需要做如下操作(thttpd-2.21b版本的安装脚本写的更软弱,所以需要手动添加):
# mkdir /user/thttpd/{man,sbin,www,etc,logs} -p
# mkdir /user/thttpd/man/ {man1,man8} -p
# mkdir /user/thttpd/www/cgi-bin -p

3. 创建配置文件
# cd /user/thttpd/etc/
# vi thttpd.conf
dir=/user/thttpd/home/httpd/html
user=root # default=nobody
charset = utf-8
logfile=/user/thttpd/var/log/thttpd.log
pidfile=/user/thttpd/var/run/thttpd.pid
cgipat=/user/thttpd/www/cgi-bin/*

4. 测试
当你做完这到这步的时候,执行下看下结果,不要怀疑自己的眼睛,你已经成功移植了

5. 参考案例:
http://www.veryarm.com/1306.html
http://blog.chinaunix.net/uid-22982394-id-147256.html

转载于:https://www.cnblogs.com/suidan1314/p/5368456.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值