下载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. C# RabbitMQ

    鉴于本人很懒,发现好的文章一般都直接copy,本文大体摘自:https://www.cnblogs.com/MuNet/p/8546192.html 1.引言 RabbitMQ——Rabbit Mes ...

  2. O2O、B2B、C2C(通俗讲解)

    你在地摊买东西,C2C你去超市买东西,B2C超市找经销商进货,B2B超市出租柜台给经销商卖东西,B2B2C你在网上下载个优惠券去KFC消费,O2O 一:O2O 1.概念: O2O即Online To ...

  3. 在右键菜单中加入BitLocker重新上锁功能

    当使用BitLocker给磁盘上锁后,可以通过命令:manage-bde -lock d: -forcedismount 将已经解锁的磁盘重新上锁,如果觉得每次都通过命令行写命令很麻烦,那可以通过修改 ...

  4. 【原创】大数据基础之ElasticSearch(1)简介、安装、使用

    ElasticSearch 6.6.0 官方:https://www.elastic.co/ 一 简介 ElasticSearch简单来说是对lucene的分布式封装,增加了shard(每个shard ...

  5. thinkphp5.0 ajax分页

    放到    ***thinkphp\library\think\paginator\driver\Ajaxbootstrap.php 分页的type参数为ajaxbootstrap <?php/ ...

  6. redis-string操作

    操作之String操作 String操作,redis中的String在在内存中按照一个name对应一个value来存储.如图: set(name, value,ex=None,px=None,nx=F ...

  7. Oracle 升级的必要性

    一.Oracle 历史 Oracle database 作为Oracle 公司的商业产品,凭借其稳定性和运行高效占据了全球三成以上的市场.并且主要是金融.政府等领域. Oracle 数据库拥有近40年 ...

  8. apache 配置反向代理 设置

    1.下载 安装 下载地址:http://httpd.apache.org/download.cgi 将apache 安装到某个目录中 修改conf/http.conf文件 修改配置文件端口  (端口为 ...

  9. docker 进阶

    docker 常用命令: docker  pull hub.c.163.com/library/mysql:latest  #这是从网址下载下来mysql镜像 docker run  -d -p 88 ...

  10. 剑指offer数组3

    面试题11:旋转数组的最小数字 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转. 输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素. 例如数组{3,4,5,1,2}为{1,2 ...