Lighttpd+PHP5+slqite3搭建轻量级Web生产环境,适用于需要在性能较差的机器上搭建Web服务的场景
1.安装sqlite3
下载安装包,解压缩
./configure
1 | ... |
安装
sudo apt-get install make
make
1 | ... |
make install
1 | See any operating system documentation about shared libraries for |
sqlite基本操作
root@ubuntu:/opt/lightServer/sqlite-autoconf-3080803# sqlite3
1 | SQLite version 3.8.8.3 2015-02-25 13:29:11 |
安装lighttpd
sudo apt-get install libpcre3-dev zlib1g-dev libbz2-dev
./configure
1 | config.status: executing libtool commands |
make & make install
1
2
3
4
5
6
7 make[1]: Leaving directory `/opt/lightServer/lighttpd-1.4.35/tests'
make[1]: Entering directory `/opt/lightServer/lighttpd-1.4.35'
make[2]: Entering directory `/opt/lightServer/lighttpd-1.4.35'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/opt/lightServer/lighttpd-1.4.35'
make[1]: Leaving directory `/opt/lightServer/lighttpd-1.4.35'
sudo apt-get install lighttpd
vim /etc/lighttpd/lighttpd.conf
1 | server.modules = ( |
/opt/lightServer/lighttpd/sbin/lighttpd -f lighttpd.conf # 使用前面配置的配置文件
安装PHP
./configure \
–prefix=/opt/lightServer/php5 \
–enable-cgi \
–enable-force-cgi-redirect \
–enable-soap \
–enable-sockets \
–enable-sqlite-utf8
1 | creating main/internal_functions_cli.c |
make
make & make install
修改lighttpd配置文件 vim /etc/lighttpd/lighttpd.conf
1 | server.modules += ("mod_fastcgi") |
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
浏览器中访问http://localhost:2180/lighttpd.php,效果如标题图所示
<!–
阅读量次
–>
版权声明
本文标题:3-Lighttpd+PHP5+slqite3搭建轻量级Web生产环境
文章作者:盛领
发布时间:2015年02月27日 - 00:25:55
原始链接:http://blog.xiaoyuyu.net/post/6eaca5ac.html
许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。
如您有任何商业合作或者授权方面的协商,请给我留言:sunsetxiao@126.com