Linux安装WordPress

Linux安装WordPress 

² 所使用软件

(1)虚拟机:Vmware workstation 11.0.0 build-2305329

(2Linux:Red Hat Enterprise Linux 6

² 搭建过程

一.下载

下载wordpress-4.3.1-zh_CN.tar  网址:http://wordpress.org/download/

二.安装步骤

1. 安装配置php、mysql、apache服务

yum – y install httpd php php-gd php-mysql mysql-server mysql-client

2.修改apache配置文件

vi /etc/httpd/conf/httpd.conf

--找到如下内容:

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

--然后在后面添加如下内容:

AddType application/x-httpd-php .php .php3

AddType application/x-httpd-php-source .phps

保存退出,并重启apache

service httpd restart

3.在/var/www/下建立一个文件index.php里面写入:

<?php phpinfo(); ?>

测试php

4. 修改mysql密码

mysqladmin password 123456

登陆mysql:#mysql -u root -p

5.建立数据库和建立wordpress用户

mysql> create database wordpress;

mysql> grant all on wordpress.* to wordpress@localhost identified by 'portalhuan.123';

6.刷新privileges.

mysql>flush privileges;

7.将解压出来的wordpress目录下的文件复制到/var/www/目录下。进入wordpress目录。

将wp-config-sample.php改名为wp-config.php.

用vim打开wp-config.php,输入数据库信息。

define('DB_NAME', 'wordpress'); // The name of the database

define('DB_USER', 'username'); // Your MySQL username

define('DB_PASSWORD', 'password'); // ...and password

define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

将解压出来的wordpress目录下的文件复制到/var/www/目录下,(不包括wordpress目录)

.测试安装

用浏览器打开http://127.0.0.1/wordpress/wp-admin/install.php或者http://localhost/wordpress/wp-admin/install.php进行wordpress的安装

 

 

 

 

转载于:https://www.cnblogs.com/littlegarden/p/7576005.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值