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

  • 相关阅读:
    罗马数字
    逆序对
    等价串
    郊区春游
    贝壳找房函数最值
    Educational Codeforces Round 45 Editorial
    Codeforces Round #486 (Div. 3)
    checkbox保存和赋值
    oninput和onchange的区别
    cookie路径概念理解
  • 原文地址:https://www.cnblogs.com/findumars/p/6901802.html
Copyright © 2011-2022 走看看