zoukankan      html  css  js  c++  java
  • PHP的MIPS交叉编译(CC=mipsel-openwrt-linux-uclibc-gcc,LD=mipsel-openwrt-linux-uclibc-ld)

    物联网内存吃紧,跑JVM这种内存大户肯定吃不消.
    要跑还是跑C实现的服务,比如Nginx+PHP+SQLite.
    比如一些家用无线路由器,系统是Linux发行版OpenWrt,内存只有64MB到128MB,单核580MHz.
    而PHP内置HTTP服务器和SQLite数据库,在无线路由器里对外提供HTTP服务丝毫没有问题.
    交叉编译PHP也很简单:
    cd /opt/miwifi/src/php-7.1.5
    CC=mipsel-openwrt-linux-uclibc-gcc
    AR=mipsel-openwrt-linux-uclibc-ar
    LD=mipsel-openwrt-linux-uclibc-ld
    RANLIB=mipsel-openwrt-linux-uclibc-ranlib
    STRIP=mipsel-openwrt-linux-uclibc-strip
    ./configure
    --host=mipsel-openwrt-linux-uclibc
    --prefix=/opt/miwifi/php/7.1
    --enable-cli
    --disable-cgi
    --disable-fpm
    --disable-phpdbg
    --disable-all
    --with-sqlite3
    --with-pdo-sqlite
    --enable-json
    --enable-session
    --enable-mbstring
    --enable-bcmath
    当然了,PHP还有Swoole这种网络编程框架.

    http://www.oschina.net/news/85126/top-programming-languages-operating-systems-for-iot

  • 相关阅读:
    洛谷 P1363 幻想迷宫
    洛谷 P2872 [USACO07DEC]道路建设Building Roads
    字符编码
    python 基础数据类型
    python基础数据类型
    Python中的流程控制
    Python的入门基础
    计算机基础
    Java Random 随机数
    Java Array二维数组使用
  • 原文地址:https://www.cnblogs.com/findumars/p/6901802.html
Copyright © 2011-2022 走看看