标签:ble -- sftp pac org 阿里云 conf php5 temp
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
yum -y install mysql-server mysql-devel
service mysqld start
mysqladmin -u root password abc,123
mysql -u root -pabc,123
create database wordpress;
/usr/bin/mysql_secure_installation 删除测试数据
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
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 启动服务
wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.zip
unzip wordpress-4.8.1-zh_CN.zip -d /var/www/html
访问下面的链接完成安装配置
http://wordpress.liaolongjun.com
管理员地址
http://wordpress.liaolongjun.com/wp-admin/
yum install vsftpd -y
vi /etc/vsftpd/ftpusers 删除root
vi /etc/vsftpd/user_list 删除root
service vsftpd restart
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
标签:ble -- sftp pac org 阿里云 conf php5 temp
原文地址:http://www.cnblogs.com/liaolongjun/p/7607658.html