Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.安装依赖包及数据库授权
博主推荐阅读:
https://www.cnblogs.com/yinzhengjie/p/12019502.html
二.布署WordPress博客程序
1>.下载wordpress软件
官方网站:
https://cn.wordpress.org/
2>.解压缩WordPress博客程序到网页站点目录下
[root@node101.yinzhengjie.org.cn ~]# yum -y install unzip zip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.huaweicloud.com
* epel: mirrors.yun-idc.com
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package unzip.x86_64 :6.0-.el7 will be installed
---> Package zip.x86_64 :3.0-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================
Installing:
unzip x86_64 6.0-.el7 base k
zip x86_64 3.0-.el7 base k Transaction Summary
=================================================================================================================================
Install Packages Total download size: k
Installed size: 1.1 M
Downloading packages:
(/): unzip-6.0-.el7.x86_64.rpm | kB ::
(/): zip-3.0-.el7.x86_64.rpm | kB ::
---------------------------------------------------------------------------------------------------------------------------------
Total kB/s | kB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : zip-3.0-.el7.x86_64 /
Installing : unzip-6.0-.el7.x86_64 /
Verifying : unzip-6.0-.el7.x86_64 /
Verifying : zip-3.0-.el7.x86_64 / Installed:
unzip.x86_64 :6.0-.el7 zip.x86_64 :3.0-.el7 Complete!
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# yum -y install unzip zip
[root@node101.yinzhengjie.org.cn ~]# unzip wordpress-5.0-zh_CN.zip
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# ll
total
-rw-r--r-- root root Dec : phpMyAdmin-4.0.10.20-all-languages.tar.xz
drwxr-xr-x root root Dec wordpress
-rw-r--r-- root root Dec : wordpress-5.0-zh_CN.zip
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# mv wordpress /var/www/html/
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# ll
total
-rw-r--r-- root root Dec : phpMyAdmin-4.0.10.20-all-languages.tar.xz
-rw-r--r-- root root Dec : wordpress-5.0-zh_CN.zip
[root@node101.yinzhengjie.org.cn ~]#
3>.配置wordpress与数据库相连接
[root@node101.yinzhengjie.org.cn ~]# cd /var/www/html/wordpress/
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]#
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]#
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]# ll
total
-rw-r--r-- root root Sep index.php
-rw-r--r-- root root Jan license.txt
-rw-r--r-- root root Dec readme.html
-rw-r--r-- root root May wp-activate.php
drwxr-xr-x root root Dec wp-admin
-rw-r--r-- root root Dec wp-blog-header.php
-rw-r--r-- root root May wp-comments-post.php
-rw-r--r-- root root Dec wp-config-sample.php
drwxr-xr-x root root Dec wp-content
-rw-r--r-- root root Aug wp-cron.php
drwxr-xr-x root root Dec wp-includes
-rw-r--r-- root root Nov wp-links-opml.php
-rw-r--r-- root root Aug wp-load.php
-rw-r--r-- root root Oct wp-login.php
-rw-r--r-- root root Jan wp-mail.php
-rw-r--r-- root root Oct wp-settings.php
-rw-r--r-- root root Apr wp-signup.php
-rw-r--r-- root root Oct wp-trackback.php
-rw-r--r-- root root Aug xmlrpc.php
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]#
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]# cp wp-config-sample.php wp-config.php
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]#
[root@node101.yinzhengjie.org.cn /var/www/html/wordpress]# vim wp-config.php #如下图所示,编辑数据库相关配置信息
4>.访问WordPress的WebUI的安装界面,如下图所示,填写相应的信息
5>.安装WordPress成功
也可以使用PhpMyAdmin的WebUI查看wordpress数据库,如下图所示。
6>.安装成功后,点击"登录"就会进入到如下图所示到界面,输入咱们在安装界面配置到密码登录即可
7>.wordpress登录成功
三>.修改wordpress的默认主题
1>.访问wordpress博客的默认主题页面
2>.登录博客系统,如下图所示,点击"外观"并启用自己喜欢的主题
3>.启用主题成功
4>.再次访问wordpress博客的默认主题页面
5>.至此,wordpress博客搭建成功
workpress博客有很多有趣的插件,感兴趣的小伙伴可以试着安装一下,当然也有很多主题,尝试点点鼠标就能对该软件有个大致了解。 明人不说暗话,你完全可以买台便宜点的阿里云服务器,用该软件搭建一个自己的博客系统。