[转载]使用postgresql安装wordpress

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


以后可以有自己的博客了

posted @ 2015-04-30 21:19  realhero  阅读(2008)  评论(0编辑  收藏  举报