引言
- 常规的lamp已经无法满足博主激荡的心情随着技术的迭代更新访问量的加大博主想要升级web服务
项目需求
将LAMP升级成LNMP
项目部署
1.备份数据库
mysqldump -uroot -p你的密码 wordpress > wordpress.sql
2.将原来的lamp环境卸载
yum remove apache mariadb-* php-*
3.lnmp一键搭建简单快捷
wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4 && ./install.sh lnmp
4.修改Nginx配置文件
server
{
listen 80 default_server;
server_name bk.poph163.com;
index index.html index.htm index.php;
root /usr/local/nginx/html/wordpress;
#error_page 404 /404.html;
include enable-php.conf;
location / {
try_files uri uri/ /index.php?args; } location ~ .*\.(php|php5)?
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
5.创建用户名
useradd xxxx
echo 'xxxx'|passwd --stdin xxxx
6.下载workpress
官方下载解压到你的Nginx目录
7.启动服务
lnmp restart
8.数据库授权
可查上一篇
9.登入web
配置登入导入数据库信息结束