立即注册 找回密码

QQ登录

只需一步,快速开始

查看: 4357|回复: 0

[Linux主机系统教程] Debian系统安装Lighttpd/SQLite/PHP建站环境

[复制链接]
发表于 2015-6-1 18:30:49 | 显示全部楼层 |阅读模式
道勤网-数据www.daoqin.net

亲注册登录道勤网-可以查看更多帖子内容哦!(包涵精彩图片、文字详情等)请您及时注册登录-www.daoqin.net

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 学习NO.1 于 2015-6-1 18:33 编辑

应该在上个月有网友找道勤提到两次希望能整理一篇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建站换完毕。后面我们就可以创建站点、安装网站。


道勤主机提供365天*24小时全年全天无休、实时在线、零等待的售后技术支持。竭力为您免费处理您在使用道勤主机过程中所遇到的一切问题! 如果您是道勤主机用户,那么您可以通过QQ【792472177】、售后QQ【59133755】、旺旺【诠释意念】、微信:q792472177免费电话、后台提交工单这些方式联系道勤主机客服! 如果您不是我们的客户也没问题,点击页面最右边的企业QQ在线咨询图标联系我们并购买后,我们为您免费进行无缝搬家服务,让您享受网站零访问延迟的迁移到道勤主机的服务!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

道勤网- 推荐内容!上一条 /2 下一条

!jz_fbzt! !jz_sgzt! !jz_xgzt! 快速回复 !jz_fhlb! !jz_lxwm! !jz_gfqqq!

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

GMT+8, 2024-5-9 20:34

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

快速回复 返回顶部 返回列表