立即注册 找回密码

QQ登录

只需一步,快速开始

Debian系统安装Lighttpd/SQLite/PHP建站环境

2015-6-1 18:34| 发布者: 学习NO.1| 查看: 1035| 评论: 0|原作者: 学习NO.1

摘要: 应该在上个月有网友找道勤提到两次希望能整理一篇Lighttpd/SQLite/PHP VPS建站环境的教程出来,因为有网站搭建需要使用。今天上午想到这个事情还是寻找网上的资源,然后补充整理Lighttpd/SQLite/PHP环境的文章教程。 ...

应该在上个月有网友找道勤提到两次希望能整理一篇Lighttpd/SQLite/PHP vps建站环境的教程出来,因为有网站搭建需要使用。今天上午想到这个事情还是寻找网上的资源,然后补充整理Lighttpd/SQLite/PHP环境的文章教程。因为道勤也有发现比如Typecho、ZBLOG PHP等都有支持SQLite数据库,且比使用MYSQL节省资源,尤其是在用低配置内存的VPS时候用SQLite数据库还是不错的。

当然,不管我们用于什么项目中,在这篇文章中道勤分享基于Debian系统安装Lighttpd/SQLite/PHP建站环境,参考和查阅不少的文章,经过大半天的测试安装终于成功。


第一、升级debian环境

  1. apt-get update && apt-get -y upgrade
复制代码

我们需要先升级最新的debian环境状态,因为不升级可能下面的环境包也不好安装。

第二、安装Lighttpd和SQLite数据库

  1. apt-get install lighttpd #安装Lighttpd
  2. apt-get install sqlite #安装SQLite
复制代码

第三、安装PHP环境需要的组件

  1. apt-get install php5-cgi php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
复制代码

第四、修改php.ini配置文件(vi /etc/php5/cgi/php.ini)

cgi.fix_pathinfo启动且值修改成1

6666.jpg

第五、配置/etc/lighttpd/lighttpd.conf文件

  1. server.modules = (
  2. "mod_access",
  3. "mod_alias",
  4. "mod_compress",
  5. "mod_redirect",
  6. "mod_rewrite",
  7. "mod_fastcgi",
  8. )
  9. server.document-root = "/var/www"
  10. server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
  11. server.errorlog = "/var/log/lighttpd/error.log"
  12. server.pid-file = "/var/run/lighttpd.pid"
  13. server.username = "www-data"
  14. server.groupname = "www-data"
  15. index-file.names = ( "index.php", "index.html",
  16. "index.htm", "default.htm",
  17. " index.lighttpd.html" )
  18. url.access-deny = ( "~", ".inc" )
  19. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  20. include_shell "/usr/share/lighttpd/use-ipv6.pl"
  21. dir-listing.encoding = "utf-8"
  22. server.dir-listing = "enable"
  23. compress.cache-dir = "/var/cache/lighttpd/compress/"
  24. compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
  25. include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  26. include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
  27. fastcgi.server = ( ".php" => ((
  28. "bin-path" => "/usr/bin/php5-cgi",
  29. "socket" => "/tmp/php.socket",
  30. "max-procs" => 1,
  31. "bin-environment" => (
  32. "PHP_FCGI_CHILDREN" => "4",
  33. "PHP_FCGI_MAX_REQUESTS" => "1000"
  34. ),
  35. )))
复制代码

斜体部分是我添加和修改的,其他不变。


第六、重启Lighttpd

  1. /etc/init.d/lighttpd restart
复制代码

这样,道勤在debian系统下创建/搭建Lighttpd/SQLite/PHP建站换完毕。后面我们就可以创建站点、安装网站。



鲜花

握手

雷人

路过

鸡蛋

最新评论

相关推荐
!jz_fbzt! !jz_lxwm! !jz_gfqqq!

关于我们|手机版|小黑屋|地图|【道勤网】-www.daoqin.net 软件视频自学教程|免费教程|自学电脑|3D教程|平面教程|影视动画教程|办公教程|机械设计教程|网站设计教程【道勤网】 ( 皖ICP备15000319号-1 )

GMT+8, 2024-5-16 12:47

Powered by DaoQin! X3.4 © 2016-2063 Dao Qin & 道勤科技

返回顶部