wordpress配置安装

1、首先进行lamp框架的搭建

服务器环境:Linux Centos 7.2.1511 64位

内存:2G 

磁盘空间100GB

IP地址:10.55.10.79

进行httpd,php,php-mysql,mariadb-server的安装,安装均使用yum安装

~]# yum -y install httpd php php-mysql mariadb-server

进行防火墙和selinux的关闭

systemctl stop firewalld.service

systemctl disable firewalld.service

编辑selinux的配置文档/etc/sel/etc/selinux/config将SELINUX=选项设置为disable

setenforce=0

2、配置httpd server

创建itblog网站目录

mkdir /itblog

创建虚拟主机

 vim /etc/httpd/conf.d/virtualhosts.conf

<VirtualHost *:80>

ServerName itblog.cptw.com.cn

DocumentRoot "/itblog"

<Directory "/itblog">

Options None

AllowOverride None

Require all granted

</Directory>

</VirtualHost>

注释掉/etc/httpd/conf/httpd.conf中的DocumentRoot

进行http服务开启

systemctl start httpd

通过ssl -tnl查看80端口是否已经开启或者通过systemctl status httpd进行状态查看

 

3、配置mariadb,创建wordpress所需的数据库

root@itblog wordpress]# mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 2

Server version: 5.5.50-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT ALL ON wpdb.* TO wpuser@'10.%.%.%' IDENTIFIED BY 'wppass';

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> create database wpdb

    -> ;

Query OK, 1 row affected (0.00 sec)

修改mariadb配置文档

vim /etc/my.cf

[mysqld]

skip_name_resolve = ON

开启数据库systemctl start mariadb.service

4、解压wordpress至网站目录

~]#unzip -c wordpress-4.5.3-zh_CN.zip  

~]# cp -rf wordpress /itblog

修改wordpress配置文档

~#] mv wp-config-sample.php wp-config.php

~#]vim wp-config.php

/** WordPress数据库的名称 */

[root@itblog wordpress]# vim wp-config.php

define('DB_NAME', 'wpdb');

/** MySQL数据库用户名 */

define('DB_USER', 'wpuser');

/** MySQL数据库密码 */

define('DB_PASSWORD', '######');

/** MySQL主机 */

define('DB_HOST', '10.55.10.79');

/** 创建数据表时默认的文字编码 */

define('DB_CHARSET', 'utf8');

此时网站即可正常访问并进行初始化设置即可

6、 插件安装

wordpress自带的文档编辑插件很土

安装Kindeditor For WordPress插件即可

安装插件问题

要执行请求的操作,WordPress需要访问您网页服务器的权限。 请输入您的FTP登录凭据

http://www.itbulu.com/wordpress-ftp.html

编辑wp-config-php的配置档,末行添加

define("FS_METHOD", "direct");

define("FS_CHMOD_DIR", 0777);

define("FS_CHMOD_FILE", 0777);

 

原创文章,作者:N23-苏州-void,如若转载,请注明出处:http://www.178linux.com/57393

(0)
N23-苏州-voidN23-苏州-void
上一篇 2016-11-03 23:10
下一篇 2016-11-04 11:07

相关推荐

  • ​N25第三周作业

    第三周 一、列出当前系统上所有已经登录的用户的用户名,注意:同一个用户登录多次,则只显示一次即可。 [root@zf ~]# who | cut -d " " -f1  | sort | uniq -…

    Linux干货 2016-12-14
  • Hadoop新增datanode与SecondaryNameNode

    无论是新增namenode还是SecondaryNameNode,操作方法大致相同 一、如果新增datanode,需要保证namenode能无密码ssh连接到新datanode 如果是添加SecondaryNameNode,则需保证其能无密码ssh连接至各datanode和namenode,namenode也需要能无密码连接到新SecondaryNameNo…

    Linux干货 2015-03-08
  • Linux 基础 (1)

    su nano shell type hash alias date cal screen echo $ tab (df bc rz(sz) ifconfig ping tty who whoami w) 1.用户  root为超级用户 1) useradd oracle  创建一个oracle用户     su &#…

    2017-07-13
  • 例图分析软、硬链接

    在linux系统中存在两种链接方式硬链接和软连接,两种链接方式在系统中是完全不同的模式,本文主要详述两种的区别并给与图示; 创建guo ,lin两个文件,两个文件分别用于演示软连接和硬链接     图一:创建文件   创建软连接guo.ruan1     图二:创建软连…

    Linux干货 2016-10-29
  • Xen虚拟化平台安装及实时迁移

    前言 Xen是英国剑桥大学计算机实验室开发的一个虚拟化开源项目,Xen可以在一套物理硬件上安全的执行多个虚拟机,它和操作平台结合的极为密切,占用的资源极少。以高性能、占用资源少著称,赢得了IBM、AMD、HP、Redhat和Novell等众多世界级软硬件厂商的高度认可和大力支持,已被国内外众多企事业用户用来搭建高性能的虚拟化平台。 Xen虚拟化类型 Xen对…

    Linux干货 2015-07-19
  • shell脚本1

    shell脚本基础 shell脚本: 包含一些命令或声明,并符合一定格式的文本文件 格式要求:首行shebang机制 #!/bin/bash #!/usr/bin/python #!/usr/bin/perl shell脚本的用途有: 自动化常用命令 执行系统管理和故障排除 创建简单的应用程序 处理文本或文件 创建shell脚本 第一步:使用文本编辑器来创建…

    2017-08-05