[不花钱站长]:从免费域名开始[0元] Oracle永久免费VPS[0元] VPS环境搭建免费脚本[0元] 秒变大盘挂载免费网盘[0元] 小白免费采集器1天500W[0元] CF免费DNS+CDN服务[0元]
[零基础网赚]:撸本站免费源码[0元] 网站强引免费蜘蛛法[0元] 图片视频文件免费存储[0元] 外链轻松发布免费友链[0元] 入坑免费教程学习源代码[0元] 网上百种+赚钱联盟推荐[?元]

↑↑VPS推荐网 WWW.VPS.COM.IN 稳定 便宜 免备案↑↑


您现在的位置是:首页 > 全球[VPS测评] >  64MB VPS,Lighttpd安装,SQLite安装,VPS建站,便宜VPS,国外永久免费VPS

64MB内存VPS安装ZBLOG PHP程序建站(二)→安装Lighttpd、SQLite、PHP

全球[VPS测评]来源:VPS推荐网点击:827
【性价之王】【线路之王】【价格之王】【配置之王】
【免费之王】【香港首推】【梯子之王】【独服之王】
64MB内存VPS安装ZBLOG PHP程序建站(二)→安装Lighttpd、SQLite、PHP

在上一篇\”Debian系统选择及精简\”中,我们已经对Debian系统环境进行了精简和优化,即便是1MB内存我们也需要去精简到极致,为了给必须安装的软件、站点留出更多的内存。那在这篇文章中,蜗牛继续整理,这一步我们就需要安装网站需要基于的环境。我们比较常见的是直接用网上使用较多的一键包或者WEB面板方便,但是我们这里就不能使用,因为手工安装的环境是节省资源的。

对于WEB环境,我们用Lighttpd,因为比Nginx或者Apache节省资源。数据库我们更不能用占用资源较大的MYSQL,而是用占用资源较小的SQLite。所以我们在选择程序的时候,可以用支持SQLite数据库的ZBLOG PHP或者TYPECHO程序等。WORDPRESS占用内存较大,我们就不在小内存VPS中使用。

第一、安装Lighttpd

apt-get install lighttpd

有出现[y/n],什么输入y然后回车继续。

第二、安装SQLite

apt-get install 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环境以及站点需要的PHP组件。

第四、配置PHP.INI文件

vi /etc/php5/cgi/php.ini

查找cgi.fix_pathinfo命令,把前面的;去掉,检查是不是1,保存退出。

第五、新建一个用户管理运行Lighttpd

useradd -d /home/wwwroot -m -s /bin/bash www

第六、修改Lighttpd配置

vi /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\”
server.groupname            = \”www\”

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\”
),
)))

第七、修改日志目录的所有者

chown -R www:www /var/log/lighttpd

第八、重启Lighttpd

/etc/init.d/lighttpd restart

这样我们的环境就搭建完成。后面我们就可以开始新建需要在环境中安装的站点。


[64MB VPS]历史优惠活动内容
  • 基于64MB VPS主机安装Typecho或者ZBLOG PHP网站环境全过程
  • 基于64MB VPS主机安装Typecho或者ZBLOG PHP网站环境全过程

  • 猜你可能想看的VPS


    转载请注明原文地址:http://140.238.13.167:12355/read-39154.html

    下一篇       上一篇