NBA
lnmp(搭建LNMP环境)

先上结果

安装 Nginx, 使用 yum 安装 Nginx:yum install nginx -y 修改 /etc/nginx/conf.d/default.conf,去除对 IPv6 地址的监听 可参考下面的示例: 主要是去掉 # listen [::]:80 default_server; server { listen 80 default_server; listen [::]:80 default_server;

}

配置数据库, 进入 MySQL:mysql -uroot --password='root'

MySQL 部分设置完了,我们退出 MySQL 环境:exit

这一步主要是修改这三项

/* MySQL database username / define('DB_USER', 'root');

配置 Nginx,

cd /etc/nginx/conf.d/ mv default.conf defaut.conf.bak 在 /etc/nginx/conf.d创建 wordpress.conf 配置,参考下面的内容: server { listen 80; root /usr/share/wordpress; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php index.php; } pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

好了, 到此结束, 可以在浏览器上边输入IP地址进行访问


顶一下()     踩一下()

热门推荐

发表评论
0评