下载wordpress安装包

wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.zip

unzip wordpress-4.8.1-zh_CN.zip -d /var/www/html(如果目录不存在,则需要先创建 mkdir -p /var/www/html)

设置文件访问权限

chmod -R 777 /var/www/html/wordpress

安装mysql,并创建wordpress库

yum -y install mysql-server mysql-devel

service mysqld start

mysqladmin -u root password abc,123

mysql -u root -pabc,123

create database wordpress;

安装php5.6

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof

安装配置nginx

yum install nginx -y

配置

vi /etc/nginx/conf.d/default.conf

添加下面代码

server {

listen 80;

server_name wordpress.liaolongjun.com;

location / {

proxy_pass http://127.0.0.1:81;

proxy_redirect off;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

}

启动服务

service nginx restart

安装Apache

yum install httpd -y

配置

vi /etc/httpd/conf/httpd.conf

Listen 80 改成 Listen 81

#ServerName www.example.com:80   改成  ServerName 127.0.0.1:81

#NameVirtualHost *:80   改成  NameVirtualHost *:81

配置

vi /etc/httpd/conf.d/welcome.conf

添加下面代码:

<VirtualHost *:81>

ServerName wordpress.liaolongjun.com

DocumentRoot /var/www/html/wordpress/

<Directory /var/www/html/wordpress>

Order deny,allow

Allow from all

</Directory>

</VirtualHost>

启动服务

service httpd restart

访问下面的链接完成安装配置

http://wordpress.liaolongjun.com

管理员地址
http://wordpress.liaolongjun.com/wp-admin/

补充:wordpress主题安装,需要服务器端安装ftp

yum install vsftpd -y
vi /etc/vsftpd/ftpusers 删除root
vi /etc/vsftpd/user_list 删除root
service vsftpd restart

(解决问题:wordpress安装主题 无法复制文件)

mkdir /var/www/html/wordpress/wp-content/tmp
修改文件 /var/www/html/wordpress/wp-config.php
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

在文件 wp-config.php 中找到上面描红的内容,然后在它的下面,添加下面描红的内容

define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');
define("FS_METHOD", "direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);

设置文件访问权限

chmod -R 777 /var/www/html/wordpress
        chown root /var/www/html/wordpress

阿里云服务器Linux CentOS安装配置(11)安装Wordpress的更多相关文章

  1. 阿里云服务器Linux CentOS安装配置(四)yum安装tomcat

    阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat  执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/li ...

  2. 阿里云服务器Linux CentOS安装配置(三)yum安装mysql

    阿里云服务器Linux CentOS安装配置(三)yum安装mysql 1.执行yum安装mysql命令:yum -y install mysql-server mysql-devel 2.启动mys ...

  3. 阿里云服务器Linux CentOS安装配置(零)目录

    阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...

  4. 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署

    阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...

  5. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  6. 阿里云服务器Linux CentOS安装配置(七)域名解析

    阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...

  7. 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署

    阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...

  8. 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署

    阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...

  9. 阿里云服务器Linux CentOS安装配置(二)yum安装svn

    阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...

  10. 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器

    阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 我在阿里云购买的服务器配置 CPU:1核 内存:2G 系统盘:40G 公共镜像:CentOS 6.5 64位 公网带宽:1Mbps ...

随机推荐

  1. 第29月第2天 charles

    1. https://www.jianshu.com/p/55a8c84e0f24

  2. IDEA 代码规范插件

    前言 在工作过程中,每个人的代码习惯都不同,在一起工作做同一个项目,如果按照自己的习惯来,有可能造成代码维护困难,开发进度缓慢等. 代码规范的重要性 谷歌发布的代码规范中指出,80% 的缺失是由 20 ...

  3. Linux性能工具图册-便于查阅

    该图表示了,Linux系统哪种问题用哪种工具

  4. UDP 单播、广播、多播

    一.UDP广播 广播UDP与单播UDP的区别就是IP地址不同,广播使用广播地址255.255.255.255,将消息发送到在同一广播网络上的每个主机.值得强调的是:本地广播信息是不会被路由器转发.当然 ...

  5. 第二章 Android系统与嵌入式开发

    第二章 Android系统与嵌入式开发 第二章首先要先了解Android和嵌入式Lnux系统有什么区别和联系,嵌入式Linux系统是在嵌入式设备中运行Linux系统:Android系统是在嵌入式设备中 ...

  6. ansible入门及组件介绍

    Ansible简介 Ansible是自动化运维的工具,基于Python开发,实现了批量系统配置.批量程序部署.批量运行命令等功能.Ansible是基于模块工作的,ansible提供一个框架,通过模块实 ...

  7. PHP 【二】

    EOF EOF(heredoc)是一种在命令行shell(如sh.csh.ksh.bash.PowerShell和zsh)和程序语言(像Perl.PHP.Python和Ruby)里定义一个字符串的方法 ...

  8. Solidity属性和方法的访问权限

    属性:默认是internal的类型,外部是不可以访问调用的,如果加上public的话,那么是会自动为这个属性加上一个get的方法的,比如uint   public _age; => functi ...

  9. 解构声明(Destructuring Declarations)

    解构声明的概念和作用 把一个对象成员解构(destructure)成多个变量,称为解构声明(destructuring declaration). component1(),component2()等 ...

  10. gerrit和git

    1.git Git是什么? Git是目前世界上最先进的分布式版本控制系统. SVN是集中式版本控制系统. Git与svn比较 相同:能记录文件的所有更改记录.这样是为了大量更改后,可以有记录回到过去, ...