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.www58058.com/57393

(0)
N23-蘇州-voidN23-蘇州-void
上一篇 2016-11-03
下一篇 2016-11-04

相關推薦

  • 【yum安裝程序】Centos7.4使用yum光盤安裝httpd

    舉例:Centos7.4使用yum光盤安裝httpd

    Linux干貨 2018-03-17
  • 第二周作業

    1、Linux上的文件管理類命令都有哪些,其常用的使用方法及其相關示例演示。  cp復制,mv移動,rm刪除     1、cp:             1,用法:      &n…

    Linux干貨 2016-07-04
  • Linux 基礎(5)

    /etc/passwd           /etc/shadow         /etc/gpasswd (chage)            /etc/gshadow    usera…

    2017-07-22
  • hadoop分布式集群

    分布式集群的實現 環境: 192.168.36.129 ? node1:NN,SNN,RM ?192.168.36.130 ?node2:DN,NM 192.168.36.132 ? node3:DN,NM 192.168.36.133 ? node4:DN,NM 配置java環境,每個節點時間同步,基于主機名互相通信,定義/etc/hosts 文件 &nb…

    2017-12-09
  • systemd、awk命令 N28

    第八周-2018 1/22

    2018-01-22
  • exit和退出碼

    用途說明 exit命令用于退出當前shell,在shell腳本中可以終止當前腳本執行。   常用參數 格式:exitn 退出。設置退出碼為n。(Causethe shell to exit with a status of n.)   格式:exit 退出。退出碼不變,即為最后一個命令的退出碼。(Ifn is omitted, the e…

    Linux干貨 2016-01-14
欧美性久久久久