学习NO.1 发表于 2015-6-1 18:30:49

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

本帖最后由 学习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建站环境,参考和查阅不少的文章,经过大半天的测试安装终于成功。道勤猜测你可能也会有需要使用下面几个环境安装包:
完整Debian7配置LAMP(Apache/MySQL/PHP)环境及搭建建站
完整配置CentOS6安装LAMP(Apache/MySQL/PHP)环境搭建教程
LEMP(Linux/Nginx/MySQL/PHP)一键包安装及SFTP快速建站教程
第一、升级debian环境apt-get update && apt-get -y upgrade我们需要先升级最新的debian环境状态,因为不升级可能下面的环境包也不好安装。第二、安装Lighttpd和SQLite数据库apt-get install lighttpd #安装Lighttpd
apt-get install sqlite #安装SQLite第三、安装PHP环境需要的组件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第五、配置/etc/lighttpd/lighttpd.conf文件server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
"mod_fastcgi",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "1000"
),
)))斜体部分是我添加和修改的,其他不变。
第六、重启Lighttpd/etc/init.d/lighttpd restart这样,道勤在debian系统下创建/搭建Lighttpd/SQLite/PHP建站换完毕。后面我们就可以创建站点、安装网站。
页: [1]
查看完整版本: Debian系统安装Lighttpd/SQLite/PHP建站环境