Categories
學習筆記

128MB小内存VPS搭建WordPress的解决方案

研究VPS的想必对LEB这个牛人站有点熟悉,想LEB这样的网站都可以建立在80M的Xen上,如果我们上手Buyvm年付15刀,自然不能放过建站的机会!如果孤雨就特地把这个文章给挖了出来!
原文:http://www.lowendbox.com/blog/wordpress-cheap-vps-lowendscript/

这个方案其实就是移除不必要的一些系统软件,采用更加轻便的软件代替,然后构建出Debian + Ngnix + php + MySQL + WordPress的经典组合。

1.首先,入手一台VPS,像buyvm的128M内存就足够了。

2.安装Debian 32bit的系统,因为脚本是针对Debian设计的,而且相比CentOS,Debian“据说”更省内存!

2.下载LEB的脚本,这个都懂的,wget命令嘛

wget --no-check-certificate https://github.com/lowendbox/lowendscript/raw/master/setup-debian.sh

3.修改系统设置,这里会有一些设置,直接【OK】,【YES】,【y】就行了。

bash setup-debian.sh system

4.exim4代替系统的sendmail

bash setup-debian.sh exim4

5.安装Nginx

bash setup-debian.sh nginx

6.安装MySQL

bash setup-debian.sh mysql

7.安装PHP

bash setup-debian.sh php

8.安装Wordpress

bash setup-debian.sh wordpress 博客域名

例子:bash setup-debian.sh wordpress guyusoftware.com

9.将你的域名用A记录解析绑到VPS上了,其实可以早点先搞!

10.访问你的域名直接进入设置站点名称,管理员用户名和密码的这一页,MySQL啥的都已经搞定了~

11.获取目录权限,解决Wordpress不能完成部分功能的问题!

chown -R www-data /var/www/网站目录

12.完成!享受Wordpress的体验吧!

备注:
如果你要添加其他Wordpress,只需要重复第8步的步骤即可~

下面是LEB脚本包含的软件和对系统的修改,偷个懒,就不翻译了~
安装/替换的软件

dropbear to replace openssh. Invoked from xinetd.
inetutils-syslogd to replace rsyslog.
exim4 to replace sendmail (if installed). Re-configured to allow Internet delivery.
cron
nginx
mysql. Re-configured to remove innodb support, remove query cache and reduce key buffer size.
php with built-in FastCGI interface. Running only 1 child process and respawn after 5,000 requests.

对系统/软件的修改:

Removing some commonly bundled applications that should not be there in the first place for a minimal distro (apache2, sendmail, bind9, samba, nscd, etc).
MySQL root is given a new password (which can be found in ~root/.my.cnf)
Installing each WordPress site under /var/www/. It will create appropriate database, users and password for the site.

3 replies on “128MB小内存VPS搭建WordPress的解决方案”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.