lighttpd + php 移植配置
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 移植配置的更多相关文章
- Zynq-7000 FreeRTOS(一)系统移植配置
软件版本:VIvado HLx 2018.2 从FreeRTOS的官网中下载源代码: https://www.freertos.org/a00104.html 图:FreeRTOS的官网 上图中,点击 ...
- 三种嵌入式web服务器(Boa / lighttpd / shttpd)的 linux移植笔记
一:移植Boa(web服务器)到嵌入式Linux系统 一.Boa程序的移植 1.下载Boa源码 下载地址: http://www.boa.org/ 目前最新发行版本: 0.94.13 ...
- 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 ...
- Qt4.8.6 Embedded Linux 的编译与移植
最近买了个飞凌ok6410 的开发板,于是在其中搭建qt4.8.6运行环境.费了两三天时间,主要还是对Linux系统的生疏,在一些问题上徘徊很久,在这里做一些过程笔记.烧写ARM-Linux系统,根据 ...
- android wifi驱动移植详细过程
转自:http://bbs.imp3.net/thread-10558924-1-1.html 对于刚入手android没多久的人来说,android wifi 驱动的移植确实还是有难度的,不过参考了 ...
- Linux内核配置机制(make menuconfig 、Kconfig、Makefile)讲解【转】
本文转载自:http://www.codexiu.cn/linux/blog/34801/ 前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式—— ...
- lighttpd 介绍及安装
一,为什么要使用lighttpd? apache不可以吗? 在支持纯静态的对象时,比如图片,文件等 , lighttpd速度更快,更理想 (lighttp 图片处理好,nginx负载 ...
- Davinci DM6446开发攻略——linux-2.6.18移植
TI DAVINCI 使用最新的内核是montavista linux-2.6.18,之前说过,国内很多公司,包括开发板的软件包,一直在使用montavista linux-2.6.10,这个版本准 ...
- Linux 内核配置机制(make menuconfig、Kconfig、makefile)讲解
前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式--在一个独立的文件夹通过makefile配合内核源码路径完成 那么如何将驱动直接编译进内核呢? ...
随机推荐
- vim删除文件第n行到结尾、或某段内容
1. 编辑文件 vim myShell.sh 2. 转到文件末尾 G 3. 或者转到删除内容最后的行 :set nu #显示行号,便于确定哪行 200G #光标定到200行,表示要删除n-200行的内 ...
- mysql中的慢查询日志
首先我们看一下关于mysql中的日志,主要包含:错误日志.查询日志.慢查询日志.事务日志.二进制日志: 日志是mysql数据库的重要组成部分.日志文件中记录着mysql数据库运行期间发生的变化:也就是 ...
- iOS - PairProgramming 结对编程
1.PairProgramming 结对编程(Pair-Programming)可能是近年来最为流行的编程方式.所谓结对编程,也就是两个人写一个程序,其中,一个人叫 Driver,另一个人叫 Obse ...
- 《practical Java》读书笔记
题记: 花了一周把Peter Haggar的<practical Java>看了遍,有所感悟,年纪大了, 写下笔记,方便日后查看.也希望有缘之人可以看看,做个渺小的指路人. 不足之处还望指 ...
- Unix环境高级编程(六)进程控制
本章介绍Unix的进程控制,包括进程创建,执行程序和进程终止,进程的属性,exec函数系列,system函数,进程会计机制. 1.进程标识符 每一个进程都有一个非负整数标识的唯一进程ID.ID为0表示 ...
- HDU 5402(Travelling Salesman Problem-构造矩阵对角最长不相交路径)
Travelling Salesman Problem Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (J ...
- Java和C++通过Socket通信中文乱码的解决
理想的开发状态是我开始就是C开发,一直是C的开发,现在还是C的开发,若干年后,幸运的话,我可以成为C语言的高手或者专家…… 更实际的情况是我开始是C开发,后来变成了JAVA开发,然后又做起了VC++的 ...
- 编码规范:Eclipse Code Templates设置
现在的项目一般都是一个团队共同开发,而每个人都有自己的编码习惯,为了统一格式,项目组在项目开发之前都会制定一系列的规范.设置Code Templates的目的主要是为了统一各种注释的格式以及代码的模板 ...
- java Webservice(一)HttpClient远程调用
我们将Web Service发布在Tomcat或者其他应用服务器上后,有很多方法可以调用该Web Service,常用的有两种: 1.通过浏览器HTTP调用,返回规范的XML文件内容 2.通 ...
- 在C#中使用WMI查询进程的用户信息
这是一个使用WMI查询信息的例子.看之前请对WMI有一个简单的了解,可以百度,或者查看我上一篇:WMI测试器 主要代码:(需要添加对System.Management的引用) //创建Win32_Pr ...