標籤:
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