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
下一篇 2016-11-04

相关推荐

  • 正则表达式和变量写脚本

    #!/bin/bash 检查系统所有用户的shell是否为bash? 注释:用grep查找是否有此类用户,如果有则为真,则$?必然为0;显示的passwd结果对我们没意义,所以重定向到空。  grep “\bbash\b$” /etc/passwd &> /dev/null  A=`echo $?` …

    Linux干货 2017-04-16
  • ​Bash2

    字串比较时变量最好使用"" 这样就不会报错了,只是退出码不为0 组合条件:     与:[ condition1 -a condition2 ]或condition1 && condition2     或:[ condition1 -o co…

    Linux干货 2016-09-25
  • 第四周 博客作业

    grep useradd cp

    Linux干货 2017-12-28
  • Linux基础之用户及组管理

    grep扩展应用,用户管理,组管理,用户及组管理命令

    2018-01-31
  • LVS详解及拓扑具体实现

    LVS:Linux Virtual Server Linux Cluster:集群,为解决某个特定问题将多台主机组织起来,满足同一个需求; 单台主机处理能力有限,包括cpu、IO、内存、带宽等资源,无法满足客户端请求;把用户的请求分散到多个不同的服务器,分摊压力; 集群的类型: LB:Load Balancing,负载均衡集群;负载均衡器,或调度器、分发器;…

    Linux干货 2016-10-28
  • 虚拟机的安装

    虚拟机的安装步骤: 1、打开VMware点击创建新的虚拟机 2、选择典型安装方式点击下一步 3、选择稍后安装操作系统点击下一步 4、客户机操作系统选择Linux,版本选择Centos 64位 5、设定虚拟机的名称及存放路径 6、设定磁盘的容量,选中将虚拟磁盘存储为单个文件 7、对虚拟设备进行设置 8、CD/DVD此项选中使用ISO映像文件并选择映像所在路径 …

    2018-03-27