阿里云服务器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 ...
随机推荐
- css实现移动端水平滚动导航
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- js高级知识---词法分析和AO 链
转载自https://www.cnblogs.com/OceanHeaven/p/4957704.html 上面一篇文章说了js的作用域链,这一节算是对上面的延申,有一个典型的例子,首先看原来的一段代 ...
- 402 CSS菜鸟:transform and transition
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 版本控制工具 - TortoiseSVN
版本控制工具 - TortoiseSVN 使用SVN需要安装三个软件,Visual SVN Server是用于存储项目仓库的中央服务器,Tortoise SVN是管理版本控制的软件,Visual SV ...
- CF1119A Ilya and a Colorful Walk
题目地址:CF1119A Ilya and a Colorful Walk \(O(n^2)\) 肯定过不掉 记 \(p_i\) 为从下标 \(1\) 开始连续出现 \(i\) 的个数 那么对于每一个 ...
- Basic Calculator I && II && III
Basic Calculator I Implement a basic calculator to evaluate a simple expression string. The expressi ...
- Spring扩展自定义的XML标签
在网上搜了许多,感觉不够全面,就找了官方文档,下面记录如何找到对应的文档进入 网上许多博客都是以dateformat为实例进行编写的,通过官方的foo,能够学到更多的东西,下面贴一段代码,在官方示例上 ...
- OrCAD Capture CIS 16.6 将版本16.6的设计文件另存为版本16.2的设计文件
操作系统:Windows 10 x64 工具1:OrCAD Capture CIS 16.6-S062 (v16-6-112FF) 启动OrCAD Capture CIS,打开.dsn设计文件,右击该 ...
- VIM编辑常用命令
1.临时使用获取root权限保存文件 :w !sudo tee % 2.多标签编辑文件 :tabnew file 3.切换标签 :tabm N (N为第几个标签,从0开始)
- 阿里云centos7成功安装和启动nginx,但是外网访问不了的解决方案
问题环境: 阿里云centos7.4.1708 问题描述:成功配置,启动成功,外网访问不了 解决方案: 经过查阅文档,去阿里云后台查看,原来是新购的服务器都加入和实例安全组. (OMG)立即去配置.加 ...