准备工作
首先,先搭建完成基础的LAMP(可参照文章:华为云主机CentOS 7.3安装LAMP)环境,然后着手搭建wordpress个人博客。
1
2
3
4
5
6
7
|
cd /usr/local/apache2.4/htdocs
rm -rf *
wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.zip
unzip wordpress-4.8.1-zh_CN.zip
cp -r wordpress/* .
rm -rf wordpress wordpress-4.8.1-zh_CN.zip
/usr/local/apache2.4/bin/apachectl graceful
|
配置数据库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
[root@plinuxos
local
]
# /usr/local/mysql/bin/mysql -uroot mysql -p
Enter password:
Reading table information
for
completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection
id
is 12
Server version: 5.6.35 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and
/or
its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and
/or
its
affiliates. Other names may be trademarks of their respective
owners.
Type
'help;'
or
'\h'
for
help. Type
'\c'
to
clear
the current input statement.
mysql> create database blog;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on blog.* to
'blog'
@
'127.0.0.1'
identified by
'centoslinux'
;
Query OK, 0 rows affected (0.00 sec)
mysql>
exit
Bye
[root@plinuxos
local
]
# /usr/local/mysql/bin/mysql -ublog -pcentoslinux -h127.0.0.1
Warning: Using a password on the
command
line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection
id
is 13
Server version: 5.6.35 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and
/or
its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and
/or
its
affiliates. Other names may be trademarks of their respective
owners.
Type
'help;'
or
'\h'
for
help. Type
'\c'
to
clear
the current input statement.
mysql>
|
配置Wordpress
1、登录网页
2、填写数据库信息
3、编辑wp-config.php文件,可以赋予写权限,也可以手动编辑。
4、填写博客相关信息
5、完成配置。
6、后台与前台
后台页面:
前台页面:
本文转自Grodd51CTO博客,原文链接:http://blog.51cto.com/juispan/1953782,如需转载请自行联系原作者