CentOS6+ LAMP+ wordpress 搭建个人博客站

    每个IT工程师都期待拥有一个自己的博客站,本文讲述在CentOS 6系统LAMP环境下使用WordPress框架构建个人博客站的详细过程。

    —-构建LAMP环境—-

1,安装apache,mysql php

yum install -y httpd mysql mysql-server php-mysql php php-devel php-gd php-xml

2,设置服务自启动

chkconfig --level 3  mysqld on
chkconfig --level 3  httpd on

3,启动服务

/etc/init.d/httpd start
/etc/init.d/mysqld start

4,更改mysql数据库配置

[root@www tools]# mysql_secure_installation
Change the root password? [Y/n] y #修改mysql管理员root密码
New password:
Re-enter new password:
Password updated successfully!
Remove anonymous users? [Y/n] y #删除匿名用户
Disallow root login remotely? [Y/n] n #是否禁止root远程登录,选择否
Remove test database and access to it? [Y/n] y #移除test数据库
Reload privilege tables now? [Y/n] y #使当前更改立即生效

5,新建wordpress数据库

[root@www tools]# mysql -uroot -p
 msql>create database wordpress;
 mysql> exit

——-下载并安装wordpress

1,下载wordpress压缩包,并把压缩包拷贝至html目录

[root@www tools]# wget https://cn.wordpress.org/wordpress-4.7.4-zh_CN.tar.gz
[root@www tools]# tar -zxvf wordpress-4.7.4-zh_CN.tar.gz
[root@www tools]# cp -r workspace/* /var/www/html/ 
[root@www tools]# cd /var/www/html/
[root@www html]# chmod -R 755 ./*

2,修改wordpress的配置文件中的数据库名称,以及用户密码,使之与之前的配置一致

[root@www html]# mv wp-config{-sample.php,.php}
[root@www html]# vim wp-config.php
 /** WordPress数据库的名称 */
 23 define('DB_NAME', 'database_name_here');
 24
 25 /** MySQL数据库用户名 */
 26 define('DB_USER', 'username_here');
 27
 28 /** MySQL数据库密码 */
 29 define('DB_PASSWORD', 'password_here');
 30
 31 /** MySQL主机 */
 32 define('DB_HOST', 'localhost');
 

—安装完成。

CentOS6+ LAMP+ wordpress 搭建个人博客站

原创文章,作者:yz_heng,如若转载,请注明出处:http://www.178linux.com/80036

(0)
yz_hengyz_heng
上一篇 2017-07-11
下一篇 2017-07-11

相关推荐

  • 文件管理及常用命令(一)

    cat命令: -n 增加行号 空行也增加行号          [root@localhost ~]# cat f1     abcd     abc…

    Linux干货 2016-08-08
  • N25第二周作业

    1、Linux上的文件管理类命令都有哪些,其常用的使用方法及其相关示例演示。     其常用的有: touch、stat、rm、cp、mv、install touch 命令    命令格式: touch [OPTION]… File… 命令参数: -a&n…

    Linux干货 2016-12-12
  • 马哥教育网络班22期+第2周课程练习

    1、Linux上文件/目录相关命令有哪些? 1)目录管理类命令:mkdir、rmdir (1)mkdir:make directorise 创建文件夹  使用格式:      mkdir [OPTION]… DIRECTORY…    &nb…

    Linux干货 2016-09-08
  • WORD文档格式要求与linux学习规划

    WORD文档格式要求 一、封面               1、活动名称(隶书,小初号字,加粗)               2、主办单位、策划日期(宋体、3号字) 二、目录    &nbs…

    Linux干货 2013-06-20
  • egrep及文本处理工具十三道实例

    1、复制/etc/skel目录为/home/tuser1,要求/home/tuser1及其内部文件的属组和其它用户均没有任何访问权限。 2、编辑/etc/group文件,添加组hadoop。 3、手动编辑/etc/passwd文件新增一行,添加用户hadoop,其基本组ID为hadoop组的id号;其家目录为/home/hadoop。 4、复制/etc/sk…

    2018-03-20
  • History的作用及调用历史命令的快捷方式

    History的作用及调用历史命令的快捷方式 M21-陆东贵 CentOS 7.2 命令历史:shell进程会在其回话中保存此前用户提交执行过的命令; history命令:命令历史; 命令语法:history [-c] [-d 偏移量] [n] 或           …

    Linux干货 2016-10-19