
128M 内存 VPS 安装 WordPress 是怎样一种体验?
前阵子买了个廉价 VPS,今天有坛友问这 VPS 怎么架设 http 服务器,忍不住就体验了一下。体验过程还算顺利,本以为会安装失败,意料之外,成功搭建运行 WordPress。
内存小,安装 nginx 或者 lighthttpd 会比较好。技术比较菜,加上懒,还是选择 LNMP 一键包安装环境。
环境:128MB 内存、128MB SWAP、10GB 硬盘,CentOS 6 32bit
安装 LNMP 前先更新一下系统,安装必要的支持。
yum update && yum upgrade
yum install wget && yum install screen
执行完毕,接下来安装 LNMP。
screen -S lnmp
wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4 && ./install.sh lnmp
选择配置:MySQL 5.5.56、MySQL InnoDB -> n、其余默认即可。(我测试的时候选了 PHP7)
接下来就是漫长的等待。
Install lnmp takes 218 minutes.
我测试是用了差不多四个小时才安装完。LNMP 搭建好就快了。
添加主机,按提示操作即可。详细教程:LNMP添加、删除虚拟主机及伪静态使用教程
lnmp vhost add
安装 WordPress
cd /data/www/default ##网站目录
wget -O w.zip https://wordpress.org/latest.zip
unzip w.zip
cd wordpress/
mv * ../
至此网站搭建成功。
参考『128M内存VPS LNMP安装优化小记』稍稍调整了一下网站配置:
Nginx 配置
/usr/local/nginx/conf/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
MySQL 配置
/etc/my.cnf
open_files_limit = 600
max_connections = 100
skip-innodb #禁用innodb数据库引擎
PHP 配置
/usr/local/php/etc/php-fpm.conf
pm.max_children = 2 #默认是10
pm.max_spare_servers = 2 #默认是6
配置完,没啥访问量的情况下,内存还有点剩余。
solusvm 控制面板看到的内存占用
free -m 内存占用
好了,言归正传,128M 内存 VPS 安装 WordPress 是怎样一种体验?
答:心急吃不了热豆腐。
Leave 128M 内存 VPS 安装 WordPress 是怎样一种体验? to:
Read more #cn posts
Best Posts From Zhijun
We have not curated any of zhijun's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.