
WordPress是使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL数据库的服务器上架设属于自己的网站。也可以把 WordPress当作一个内容管理系统CMS)来使用。WordPress是一款个人博客系统,并逐步演化成一款内容管理系统软件,它是使用PHP语言和MySQL开发的,用户可以在支持 PHP 和 MySQL数据库的服务器上使用自己的博客。
[root@lnmp ~]# tar -zxvf lnmp1.6-full.tar.gz
- [root@lnmp ~]# cd lnmp1.6-full
- [root@lnmp lnmp1.6-full]# ./install.sh
使用浏览器,输入虚拟机 IP ,即可验证ngnix服务是否搭建完成
- [root@lnmp ~]# mysql -uroot -p000000
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 1
- Server version: 5.5.62-log Source distribution
- Copyright (c) 2000, 2018, 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 wordpress;
- Query OK, 1 row affected (0.01 sec)
- mysql> grant all privileges on *.* to root@localhost identified by '000000' with grant option;
- Query OK, 0 rows affected (0.00 sec)
- mysql> grant all privileges on *.* to root@"%" identified by '000000' with grant option;
- Query OK, 0 rows affected (0.00 sec)
- mysql> Ctrl-C -- exit!
- Aborted
[root@lnmp ~]# unzip wordpress-4.7.3-zh_CN.zip
[root@lnmp default]# rm -rf index.html
- [root@lnmp wordpress]# cp -rvf * /home/wwwroot/default
- [root@lnmp wordpress]# cd /home/wwwroot/default/
- [root@lnmp default]# chmod 777 *
- [root@lnmp default]# cp wp-config-sample.php wp-config.php
- [root@lnmp default]# vi wp-config.php
- // ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //
- /** WordPress 数据库的名称 */
- define('DB_NAME', 'wordpress');
- /** MySQL 数据库用户名 */
- define('DB_USER', 'root');
- /** MySQL 数据库密码 */
- define('DB_PASSWORD', '000000');
- /** MySQL 主机 */
- define('DB_HOST', '127.0.0.1');
- /** 创建数据表时默认的文字编码 */
- define('DB_CHARSET', 'utf8');
- /** 数据库整理类型。如不确定请勿更改 */
- define('DB_COLLATE', '');
登录后,进入 WordPress 应用的后台仪表盘界面
单击“myblog”图标,进入博客首页,可以在这里发表文章,记录事迹等。