阿里云服务器Linux CentOS安装配置(11)安装Wordpress
下载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的更多相关文章
- 阿里云服务器Linux CentOS安装配置(四)yum安装tomcat
阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat 执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/li ...
- 阿里云服务器Linux CentOS安装配置(三)yum安装mysql
阿里云服务器Linux CentOS安装配置(三)yum安装mysql 1.执行yum安装mysql命令:yum -y install mysql-server mysql-devel 2.启动mys ...
- 阿里云服务器Linux CentOS安装配置(零)目录
阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...
- 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署
阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...
- 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定
阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...
- 阿里云服务器Linux CentOS安装配置(七)域名解析
阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...
- 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署
阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...
- 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署
阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...
- 阿里云服务器Linux CentOS安装配置(二)yum安装svn
阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...
- 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器
阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 我在阿里云购买的服务器配置 CPU:1核 内存:2G 系统盘:40G 公共镜像:CentOS 6.5 64位 公网带宽:1Mbps ...
随机推荐
- mac office2016
- Ch02 课堂作业
测试一:运行结果: 测试二:运行结果: 测试三:运行结果:
- DDoS的类型及原理
1.DDoS攻击: DDOS(Distributed Denial of Service),又称分布式拒绝服务攻击.骇客通过控制多个肉鸡或服务器组成的僵尸网络,对目标发送大量看似合法请求,从而占用大量 ...
- Django之AJAX
一.预备知识JSON python中的json: json.dumps( ) json.loads( ) JavaScript中的json:JSON.stringify( ) J ...
- matplotlib中的plt.ion()和plt.ioff()函数
转自https://blog.csdn.net/yzy__zju/article/details/85008603 Matplotlib的显示模式默认为阻塞(block)模式,因此若想动态显示图像,则 ...
- Vue+SpringBoot+Mybatis的简单员工管理项目
本文项目参考自:https://github.com/boylegu/SpringBoot-vue 为了完成此项目你需要会springBoot,mybatis的一些基本操作 运行界面 第一步:搭建前端 ...
- 堆溢出学习笔记(linux)
本文主要是linux下堆的数据结构及堆调试.堆溢出利用的一些基础知识 首先,linux下堆的数据结构如下 /* This struct declaration is misleading (but a ...
- oracle 11.2.0.4 rac 修改 ip vip scan ip
修改前host文件 198.27.73.21 ht-d01 198.27.73.22 ht-d02 198.27.73.25 ht-d01-vip 198.27.73.26 ht-d02-vip 19 ...
- Python编码规范(PEP8)
Introduction 介绍 本文提供的Python代码编码规范基于Python主要发行版本的标准库.Python的C语言实现的C代码规范请查看相应的PEP指南1. 这篇文档以及PEP 257(文档 ...
- python3 字典(dictionary)(一)
一.定义:是另一种可变容器模型,可存储任意类型对象:(也被称为关联数组或哈希表:存储的数据是没有顺序的) 语法为: d = {key1 : value1, key2 : value2 } #----- ...