PHP交叉编译和移植
[plain]
./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --datadir=/home/pub/johnny/network/install-php/data --disable-FEATURE --disable-all "CC=mips-linux-gnu-gcc -EL" "CFLAGS=-EL" "LDFLAGS=-EL"
make
make istall
./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --datadir=/home/pub/johnny/network/install-php/data --disable-FEATURE --disable-all "CC=mips-linux-gnu-gcc -EL" "CFLAGS=-EL" "LDFLAGS=-EL"
make
make istall
4、测试:
1)、修改fastcgi.conf
添加:
[plain]
fastcgi.server += (
"/test.php" =>
((
"socket" => "/tmp/lighttpd.test.event.socket",
"bin-path" => "/tmp/network/sbin/php-cgi",
# "bin-path" => "/home/pub/johnny/network/install-php/bin/php-cgi",
# "bin-path" => "/tmp/NMP/bin/test.php",
"max-procs" => 1,
# "host" => "127.0.0.1",
# "port" => 8081,
"check-local" => "disable",
))
)
fastcgi.server += (
"/test.php" =>
((
"socket" => "/tmp/lighttpd.test.event.socket",
"bin-path" => "/tmp/network/sbin/php-cgi",
# "bin-path" => "/home/pub/johnny/network/install-php/bin/php-cgi",
# "bin-path" => "/tmp/NMP/bin/test.php",
"max-procs" => 1,
# "host" => "127.0.0.1",
# "port" => 8081,
"check-local" => "disable",
))
)
2)、把/home/pub/johnny/network/install-php/bin/php-cgi copy 到开发板/tmp/network/sbin/php-cgi
3)、在/tmp/network/webpages/下创建test.php
[php]
phpinfo();
?>
phpinfo();
?>
4)、开发板上启动lighttpd
5)、在PC上输入http://192.168.*.*/test.php,则在浏览器上显示php的信息
推荐阅读
-
Windows下编译PHP和memcache扩展教程
-
CentOS 6.4系统下编译安装LNMP和配置PHP环境具体步骤
-
Windows下编译PHP5.4和xdebug全记录
-
PHP中基于ts与nts版本- vc6和vc9编译版本的区别详解
-
CentOS下PHP7的编译安装及MySQL的支持和一些常见问题的解决办法
-
Ubuntu环境编译安装PHP和Nginx的方法
-
交叉编译并移植tslib-1.21和QT4.8.5运行第一个嵌入式Qt程序
-
Ubuntu交叉编译tslib并移植到嵌入式Linux
-
【嵌入式】交叉编译 移植 i2cTool4.1 史上最详细
-
在Mac OS上自行编译安装Apache服务器和PHP解释器