Bootstraping WordPress/Nginx/PHP/MySQL on a Cheap VPS with lowendscript

2013年2月26日

Author: lowendscript From: http://www.lowendbox.com
Here is a quick step by step on how to set up a WordPress blog running on Nginx, PHP/FastCGI and MySQL on a low end box. Let’s assume that you are going to set up a blog on hostname “blog.example.com“.

Go and buy a cheap VPS. Yes, you know where to find cheap virtual servers under $7/month, don’t you? 🙂 I am using my 6 pound/year RackVM VPS with 128MB memory to test this script, and the performance turns out to be quite good. YMMV.

Make sure it is either a Debian or a Ubuntu distro though.

After gaining root access to your VPS,

Now altering your DNS entry to point blog.example.com to your new VPS (or alter your local /etc/hosts entry). Navigate to it from your browser, and you should be presented with WordPress set up page. Fill in your blog’s name, admin’s password and contact email, and your new WordPress is online!

Just repeat the last step (running bash setup-debian.sh wordpress ) to set up more blogs on the same box.

That’s it!

Software Stack
It’s pretty similar to my own stack that runs LowEndBox.com.

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.
The lowendscript is also

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.
I have to say that it is still “work in progress”, but if you want to figure out the internals please check the source code of that bash script.

Memory Usage
I am testing the same script on the following 3 systems:

Ubuntu 10.04 64bit (RackVM)
Debian 5 64bit (RackVM)
Debian 5 32bit (VPSGuy)
They are all showing different memory usage. I am taking the snapshot of memory usage AFTER 10 page loads on the WordPress blog that has been created to ensure PHP process is fully loaded.

Ubuntu 10.04 64bit

Memory Usage: 98.1MB
Debian 5 64bit

Memory Usage: 59.6MB
Debian 5 32bit

Memory Usage: 43.2MB

声明: 本文采用 BY-NC-SA 协议进行授权. 转载请注明转自: Bootstraping WordPress/Nginx/PHP/MySQL on a Cheap VPS with lowendscript
本文的评论功能被关闭了.