• buildroot 内添加 lighttpd 和php 等相关选项

    // make menuconfig
Target packages --->
Interpreter languages and scripting --->
[*] perl
[*] php
[*] CGI interface
[*] FPM interface
Extensions --->
[*] Readline
[*] Session
[*] zlib
[*] JSON
[*] FTP
[*] sockets
[*] Posix
[*] libxml Networking applications --->
[*] lighttpd
[*] openssl support
[*] zlib support
[*] bzip2 support
[*] pcre support
[*] webdav support
  • 进入生成的文件系统配置 lighttpd + php

    //  vim etc/lighttpd/lighttpd.conf
var.log_root = "/usr/share/lighttpd/log" // log 日志存放点
var.server_root = "/usr/share/lighttpd/www"
var.state_dir = "/usr/share/lighttpd/run"
var.home_dir = "/usr/share/lighttpd/lib/lighttpd"
var.conf_dir = "/etc/lighttpd" var.cache_dir = "/usr/share/lighttpd/cache/lighttpd" var.socket_dir = home_dir + "/sockets" // /usr/share/lighttpd/lib/lighttpd/sockets server.use-ipv6 = "disable" server.document-root = server_root + "/webpages" server.event-handler = "linux-sysepoll" server.network-backend = "writev" server.upload-dirs = ( "/usr/share/lighttpd/upload" )
    //  vim etc/lighttpd/modules.conf
server.modules = (
"mod_access",
"mod_alias",
# "mod_auth",
# "mod_authn_file",
# "mod_evasive",
# "mod_redirect",
# "mod_rewrite",
# "mod_setenv",
# "mod_usertrack",
# "mod_compress",
) include "conf.d/compress.conf" include "conf.d/fastcgi.conf"
    // vim etc/lighttpd/conf.d/fastcgi.conf
server.modules += ( "mod_fastcgi" ) ##
## PHP Example
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
## The number of php processes you will get can be easily calculated:
##
## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
##
## for the php-num-procs example it means you will get 17*5 = 85 php
## processes. you always should need this high number for your very
## busy sites. And if you have a lot of RAM. :)
##
fastcgi.server = (
".php" =>
( "php-local" =>
(
"socket" => socket_dir + "/php-fastcgi-1.socket",
"bin-path" => "/usr/bin/php-cgi",
"max-procs" => 1,
"broken-scriptfilename" => "enable",
)
)
)
    // vim etc/lighttpd/conf.d/compress.conf
server.modules += ( "mod_compress" ) ##
## where should the compressed files be cached?
## see the base config for the declaration of the variable.
##
## This directory should be changed per vhost otherwise you can
## run into trouble with overlapping filenames
##
compress.cache-dir = cache_dir + "/compress" ##
## FileTypes to compress.
##
compress.filetype = ("text/plain", "text/html")
    // vim etc/php.ini
cgi.fix_pathinfo=1
  • 创建相关目录

    mkdir -p /usr/share/lighttpd
cd /usr/share/lighttpd
mkdir cache lib log run upload www
mkdir -p cache/lighttpd/
mkdir -p lib/lighttpd/sockets/
mkdir -p www/webpages
touch www/webpages/index.php
  • 给 usr/share/lighttpd/www/webpages/index.php 添加内容

   //    vim usr/share/lighttpd/www/webpages/index.php
<?php
echo phpinfo();
?>

lighttpd + php 移植配置的更多相关文章

  1. Zynq-7000 FreeRTOS(一)系统移植配置

    软件版本:VIvado HLx 2018.2 从FreeRTOS的官网中下载源代码: https://www.freertos.org/a00104.html 图:FreeRTOS的官网 上图中,点击 ...

  2. 三种嵌入式web服务器(Boa / lighttpd / shttpd)的 linux移植笔记

    一:移植Boa(web服务器)到嵌入式Linux系统 一.Boa程序的移植 1.下载Boa源码    下载地址: http://www.boa.org/    目前最新发行版本: 0.94.13   ...

  3. Linux(centos 7)配置tomcat8、JDK1.8、lighttpd、ngnix、mysql

    JDK 下载好后使用 rpm -ivh jdk-7u25-linux-x64.rpm 进行安装. 安装好后编辑 /etc/profile 文件,在末尾加上: 1 2 3 export JAVA_HOM ...

  4. Qt4.8.6 Embedded Linux 的编译与移植

    最近买了个飞凌ok6410 的开发板,于是在其中搭建qt4.8.6运行环境.费了两三天时间,主要还是对Linux系统的生疏,在一些问题上徘徊很久,在这里做一些过程笔记.烧写ARM-Linux系统,根据 ...

  5. android wifi驱动移植详细过程

    转自:http://bbs.imp3.net/thread-10558924-1-1.html 对于刚入手android没多久的人来说,android wifi 驱动的移植确实还是有难度的,不过参考了 ...

  6. Linux内核配置机制(make menuconfig 、Kconfig、Makefile)讲解【转】

    本文转载自:http://www.codexiu.cn/linux/blog/34801/ 前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式—— ...

  7. lighttpd 介绍及安装

    一,为什么要使用lighttpd?    apache不可以吗?    在支持纯静态的对象时,比如图片,文件等 ,    lighttpd速度更快,更理想 (lighttp 图片处理好,nginx负载 ...

  8. Davinci DM6446开发攻略——linux-2.6.18移植

     TI DAVINCI 使用最新的内核是montavista linux-2.6.18,之前说过,国内很多公司,包括开发板的软件包,一直在使用montavista linux-2.6.10,这个版本准 ...

  9. Linux 内核配置机制(make menuconfig、Kconfig、makefile)讲解

    前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式--在一个独立的文件夹通过makefile配合内核源码路径完成 那么如何将驱动直接编译进内核呢? ...

随机推荐

  1. 用Canvas为网页加入动态背景

    近期刚刚接到为微信公众帐号"玩转三里屯"制作首页的任务. 考虑到页面仅仅在手机中浏览.并且手机对canvas的支持又很好,所以打算使用canvas做点不一样的动画. 首先来看下效果 ...

  2. 创建表时 ORA-00955: 名称已由现有对象使用

    如下,在执行创建表语句时报错如下: 执行下面sql查询 select a.OBJECT_type,a.* from all_objects a where upper(a.OBJECT_NAME) = ...

  3. AbatorForEclipse插件使用总结

    AbatorForEclipse是IbatorForEclipse之前的一个老版插件.插件装好后,我们来使用看看:1,新建一个工程AbatorTest,点击右键,新建一个abatorConfig.xm ...

  4. springmvc之url参数传递

    在学习 Spring Mvc 过程中,有必要来先了解几个关键参数:    @Controller: 在类上注解,则此类将编程一个控制器,在项目启动 Spring 将自动扫描此类,并进行对应URL路由映 ...

  5. leetcode48:矩阵旋转

    题目链接 输入一个N×N的方阵,要求不开辟新空间,实现矩阵旋转. 将点(x,y)绕原点顺时针旋转90度,变为(y,-x).原来的(-y,x)变为(x,y) class Solution(object) ...

  6. Oracle 11g的Deferred Segment Creation

    本篇主要介绍Oracle 11g中推出的“延迟段创建”(Deferred Segment Creation)特性,以及当我们使用这种特性时,需要注意的问题. 1)Deferred Segment Cr ...

  7. 通过源码了解ASP.NET MVC 几种Filter的执行过程 在Winform中菜单动态添加“最近使用文件”

    通过源码了解ASP.NET MVC 几种Filter的执行过程   一.前言 之前也阅读过MVC的源码,并了解过各个模块的运行原理和执行过程,但都没有形成文章(所以也忘得特别快),总感觉分析源码是大神 ...

  8. RabbitMQ与.net core(五) topic类型 与 headers类型 的Exchange

    1.topic类型的Exchange 我们之前说过Topic类型的Exchange是direct类型的模糊查询模式,可以通过routkey来实现模糊消费message,topic的模糊匹配有两种模式: ...

  9. WordPress For SAE进入后台

    今天遇到一个非常easy可是花了我半个小时的问题:怎样进入WordPress For SAE后台. 介于百度上没有搜索到.所以写了这篇博客,简单,but有用. 首先我们会訪问自己的网站:独立游戏者er ...

  10. BPMN2.0 规范

    1 启动事件 每个流程总是以启动事件作为入口,启动事件在BPMN2.0 中以细线圆圈表示.分为三种类型 空启动事件 定时启动事件 异常启动事件 消息启动事件 启动事件都是等待第三方触发才可以启动. 定 ...