80后的细娃儿

低内存VPS搭建64M Web应用环境

按照LEB的安装步骤一步一步来的安装的,
http://www.lowendbox.com/blog/yes-you-can-run-18-static-sites-on-a-64mb-link-1-vps

安装环境:Debian 5
CPU:Intel(R) Core(TM)2 Quad CPU
内存:128MB Burst:256MB
VPS是rackvm
家的$9.17/year那款。

简明步骤:

 

free
cat /proc/cpuinfo

apt-get update && apt-get upgrade
apt-get install lighttpd

ps -u www-data u

mkdir -p /var/www/html
echo 'Sopoly!' > /var/www/html/index.html

lighttpd-enable-mod simple-vhost
/etc/init.d/lighttpd force-reload

apt-get -y install mysql-server php5-cgi php5-mysql

cat > /etc/lighttpd/conf-enabled/10-cgi-php.conf
server.modules += ("mod_cgi")
cgi.assign = (".php" => "/usr/bin/php5-cgi")

/etc/init.d/lighttpd force-reload

echo '' > /var/www/html/phpinfo.php

mysqladmin -uroot -pklroot create sopoly
wget http://wordpress.org/latest.tar.gz
tar zxf latest.tar.gz -C /var/www/html
cd /var/www/html
mv index.html wordpress
mv phpinfo.php wordpress
mv wordpress ..
cd ..
rm -rf html
mv wordpress html

cat > /etc/lighttpd/conf-enabled/sopoly.conf
$HTTP["host"] == "www.sopoly.com" {
$HTTP["url"] =~ "^/" {
server.error-handler-404 = "/index.php"
}
}^D
/etc/init.d/lighttpd force-reload

ps aux
free

cat > /etc/mysql/conf.d/mysql.cnf
[mysqld]
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
skip-bdb
skip-innodb

apt-get install dash
dpkg-reconfigure dash

/etc/init.d/mysql restart

ps -C rsyslogd v
apt-get install syslog-ng && dpkg –purge rsyslog
ps -C syslog-ng v

apt-get remove –purge portmap
touch /etc/ssh/sshd_not_to_be_run
apt-get install dropbear

vi /etc/default/dropbear
/etc/init.d/dropbear start

ps -C bash v
apt-get install pdksh
chsh -s /bin/pdksh
ps -C pdksh v

ps aux
free

点赞