码迷,mamicode.com
首页 > 数据库 > 详细

[转载]使用postgresql安装wordpress

时间:2015-04-30 21:40:39      阅读:403      评论:0      收藏:0      [点我收藏+]

标签:

1. 环境安装

sudo apt-get install apache2
sudo apt-get install postgresql-9.1
sudo apt-get install php5
sudo apt-get install php5-pgsql

2. 下载wordpress, 

wget -O wordpress.tar.gz http://wordpress.org/latest.tar.gz

wget https://downloads.wordpress.org/plugin/postgresql-for-wordpress.1.3.1.zip

3. 解压并放到/var/www目录下
unzip  latest.tar.gz
unzip postgresql-for-wordpress.1.3.1.zip

sudo cp -R wordpress  /var/www
sudo chown jerry:jerry /var/www/wordpress

sudo cp -R postgresql-for-wordpress/pg4wp /var/www/wordpress/wp-content/
cp /var/www/wordpress/wp-content/pg4wp/db.php /var/www/wordpress/wp-content

4. 切换到/var/www/wordpress目录,拷贝一份wp-config-sample.php文件为wp-config.php
    vi wp-config.php

修改这四项为postgresql的配置参数

define(‘DB_NAME‘, ‘wordpress‘);

/** MySQL database username */
define(‘DB_USER‘, ‘postgres‘);

/** MySQL database password */
define(‘DB_PASSWORD‘, ‘xxxxxxx‘);

/** MySQL hostname */
define(‘DB_HOST‘, ‘localhost:5432‘);


5. 在浏览器上打开http://192.168.56.1/wordpress/,配置相应的参数就可以使用wordpress


以后可以有自己的博客了

[转载]使用postgresql安装wordpress

标签:

原文地址:http://www.cnblogs.com/zzyyxxjc/p/4469931.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!