安装wordpress
首先现在mysql上创建库
create database wordpress;
创建用户
grant all on wordpress.* to [email protected]‘localhost‘ identified by ‘123456‘; flush privileges;
调整nginx
vim /application/nginx/conf/extra/blog.conf 在localtion下面添加 index index.php index.html index.htm; 重启nginx /application/nginx/sbin/nginx -s reload
下载wordpress
cd /home/daxian/tools/ wget https://cn.wordpress.org/wordpress-4.9.1-zh_CN.tar.gz
解压缩
tar xf wordpress-4.9.1-zh_CN.tar.gz 将wordpress里面的所有文件拷贝到nginx/html/blog下面 cp -a wordpress/* /application/nginx/html/blog/
授权(这样不太安全,后面介绍安全方法)
chown -R www.www /application/nginx/html/blog/
可以访问了http://blog.daxian.com
完成,数据库中生成一些表
mysql> show tables; +---------------------------+ | Tables_in_wordpress | +---------------------------+ | daxian_commentmeta | | daxian_comments | | daxian_links | | daxian_options | | daxian_postmeta | | daxian_posts | | daxian_term_relationships | | daxian_term_taxonomy | | daxian_termmeta | | daxian_terms | | daxian_usermeta | | daxian_users | +---------------------------+ 12 rows in set (0.00 sec)
登录即可
发布博文
搭建完成!!!
原文地址:https://www.cnblogs.com/sky00747/p/8425738.html
时间: 2024-11-02 22:48:24