<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>落 &#187; Postgresql</title>
	<atom:link href="http://liluo.org/tags/postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>http://liluo.org</link>
	<description>落就是一道风景线……</description>
	<lastBuildDate>Tue, 09 Aug 2011 11:22:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PostgreSQL 9.0 安装乱乱记</title>
		<link>http://liluo.org/2010/11/postgresql-9-0-%e5%ae%89%e8%a3%85%e4%b9%b1%e4%b9%b1%e8%ae%b0/</link>
		<comments>http://liluo.org/2010/11/postgresql-9-0-%e5%ae%89%e8%a3%85%e4%b9%b1%e4%b9%b1%e8%ae%b0/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 02:24:21 +0000</pubDate>
		<dc:creator>落落</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postgresql]]></category>

		<guid isPermaLink="false">http://liluo.org/?p=606</guid>
		<description><![CDATA[PostgreSQL 9已经发布了，我属于新版本控，于是计划着在VPS( win server 2003)和服务器(CentOS 5.5)上安装，先不讲过程，结果是服务器上已成功安装，VPS主动放弃。在些提醒各位，PostgreSQL 9安装很纠结，选择需慎重。

一、VPS（win server 2003）
直接在官网下载 win安装包.exe文件,按照8.4版本的习惯一路直下，在安装完成的时候出现 “ Problem running post-install step. Installation may not complete correctly. The database cluster initialisation failed.” GG一下，看到有人讲在非英文系统下安装时Local选择非默认语言，如Singapore或c（别听那些不靠谱的说选Chinese，在9.0版本中压根没那选项）。于是把自己电脑上（ win xp）的8.4卸载，重新安装选择Singapore（新加坡，对中文支持比较好），依然一路直下，OK搞定。然后把VPS卸载重新安装，依然出错，泪流满面……把公司另台电脑格掉装上win server 2003，安装时local选Singapore，结果成功。后来又在VPS上尝试local时选C或者其他，依然失败，然后又拿8.4甚至8.3版本安装失败依然。在其他win系统（包括同版本的win server 2003）中可正常安装，好吧VPS，到期我就换掉你丫的。
win正常安装pg9请注意：中文版系统安装时local一定选择非默认语言。



二、服务器（CentOS 5.5）
一直想给服务器（使用CentOS）装上PostgreSQL，最初的时候使用yum，结果一看是在Down 8.3版本（丫的先不说9.0版已经横空出世，8.4版可出来N久了），直接ctrl+C。
之后参照鱼哥(smallfish)的教程（点击）下载了并安装了pg9初始化时:
service postgresql initdb
Usage: /etc/init.d/postgresql {start&#124;stop&#124;restart&#124;reload&#124;status}
@##@！￥￥@#什么东东，可以使用了吗？
service postgresql start
Starting PostgreSQL: ok
service postgresql stop
Stopping PostgreSQL: pg_ctl: PID file "/usr/local/pgsql/data/postmaster.pid" does not exist
Is server running?
什么状况？欲哭无泪……于是等yum安装Pg版本升级到9.0。前天几发现已经到9.0了:
yum postgresql [...]]]></description>
		<wfw:commentRss>http://liluo.org/2010/11/postgresql-9-0-%e5%ae%89%e8%a3%85%e4%b9%b1%e4%b9%b1%e8%ae%b0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu 安装 Postgresql、Pgadmin</title>
		<link>http://liluo.org/2010/07/ubuntu-%e5%ae%89%e8%a3%85-postgresql%e3%80%81pgadmin/</link>
		<comments>http://liluo.org/2010/07/ubuntu-%e5%ae%89%e8%a3%85-postgresql%e3%80%81pgadmin/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 06:24:26 +0000</pubDate>
		<dc:creator>落落</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Postgresql]]></category>

		<guid isPermaLink="false">http://liluo.org/?p=554</guid>
		<description><![CDATA[第一步：在Ubuntu下安装Postgresql

sudo apt-get install postgresql
以上指令安装服务端和命令行客户端psql。
/usr/lib/postgresql/8.4/              存放postgresql相关的二进制文件
/usr/lib/postgresql/8.4/bin/        可执行文件
/usr/lib/postgresql/8.4/lib/         共享库文件
/etc/postgres/8.4/main/              存放postgresql配置文文件
/var/lib/postgresql/                    postgres用户的主文件夹
第二步：修改PostgreSQL数据库的默认用户postgres的密码
PostgreSQL数据默认会创建一个postgres的帐号用户作为数据库的管理员，密码是随机的，所以：
首先，我们需要重置“postgres”用户的密码。
命令行如下：
sudo -u postgres psql(或者sudo su postgres -c psql)—&#62;运行psql,psql是一个标准的postgressql客户端
postgres=# ALTER USER postgres WITH PASSWORD ‘postgres’;—&#62;修改postgres的密码为postgres,不要忘记添加分号(回车后分号之前的sql语句才会立即执行)
postgres=# \q—&#62;退出
修改了数据库中的密码之后，我们还需要修改linux下的用户“postgres”的密码：设定成与数据库中postgres帐号相同的密码，即postgres。
sudo passwd -d postgres———&#62;删除密码
sudo -u postgres passwd(或者 sudo su postgres -c passwd)—–&#62;创建密码
然后输入跟之前一样的密码。
现在，我们就可以在数据库服务器上用 postgres帐号通过psql或者pgAdmin等等客户端操作数据库了（暂时还不能远程访问）。
第三步：修改PostgresSQL数据库配置实现远程访问
首先，我们需要编辑postgresql.conf：
sudo gedit /etc/postgresql/8.4/main/postgresql.conf
现在，我们需要修改“连接和权 限”两行。
改变行：#listen_addresses = ‘localhost’ 修改为：listen_addresses = ‘*’
改变行：#password_encryption = on 修改为：password_encryption = on
保存并关闭gedit。
最后一步，我们必须设置谁才可以操作数据服务器，这一切都是在pg_hba.conf中完成的。
sudo gedit /etc/postgresql/8.4/main/pg_hba.conf
把以下内容添加到 pg_hba.conf底部：
# to allow your [...]]]></description>
		<wfw:commentRss>http://liluo.org/2010/07/ubuntu-%e5%ae%89%e8%a3%85-postgresql%e3%80%81pgadmin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LNMPPP:linux-nginx-mysql-postgresql-python-php(FastCGI)</title>
		<link>http://liluo.org/2010/06/linux-nginx-mysql-postgresql-python-php-fastcgi/</link>
		<comments>http://liluo.org/2010/06/linux-nginx-mysql-postgresql-python-php-fastcgi/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 03:25:54 +0000</pubDate>
		<dc:creator>落落</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Postgresql]]></category>

		<guid isPermaLink="false">http://liluo.org/?p=512</guid>
		<description><![CDATA[前面有讲说要用nginx来配置python，这里记录下配置LNMPPP的过程，What's LNMPPP?有听过LAMP,LNMP吧？这里的LNMPPP是指Linux+Nginx+Mysql+Postgresql+Python+Php。说白了就是在System使用Linux, Web server 使用Nginx,支持Python和Php,数据库使用Postgresql和Mysql。
１、linux
fedora 13（其他版本Linux下面操作请做出相应变动）
２、安装nginx
yum install nginx　＃下载的是稳定版0.7.65，如果想使用其他版本下载安装即可。
添加到系统启动并运行nginx
chkconfig --levels 235 nginx on
/etc/init.d/nginx start
nginx已经安装完成，在浏览器里输入localhost试一下吧
３、安装Ｍysql
yum install mysql mysql-server
添加系统服务并启动
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
检查是否支持网络连接
netstat -tap &#124; grep mysql
应该会看到这样的状态
netstat -tap &#124; grep mysql
tcp        0      0 *:mysql       *:*              LISTEN      1376/mysqld
如果不是的话，需要修改/etc/my.cnf文件来启用网络连接支持
sudo gedit /etc/my.cnf
将
[...]
#skip-networking
[...]
#去掉，然后重启mysql
/etc/init.d/mysqld restart
mysql默认root用户的密码为空，需要给root设置密码(* 代表密码字符)
mysqladmin [...]]]></description>
		<wfw:commentRss>http://liluo.org/2010/06/linux-nginx-mysql-postgresql-python-php-fastcgi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

