要了解PostgreSQL基础知识,首先需要安装PostgreSQL。本章介绍在Linux,Windows和Mac OS平台上安装PostgreSQL。 yiibai.com
在Linux/UNIX安装PostgreSQL
按照下面的步骤,在Linux机器上安装PostgreSQL。请确保以root用户登录之后进行安装。
www.yiibai.com
挑选想要的,尽可能精确的PostgreSQL版本号,从一个EnterpriseDB 平台。 yiibai.com
我们这里下载的是 postgresql-9.2.4-1-linux-x64.run 64位CentOS-6机器,现在让我们执行如下: yiibai.com
[root@host]#chmod+x postgresql-9.2.4-1-linux-x64.run[root@host]#./postgresql-9.2.4-1-linux-x64.run------------------------------------------------------------------------Welcometo thePostgreSQLSetupWizard.------------------------------------------------------------------------Pleasespecify the directorywherePostgreSQLwill be installed.InstallationDirectory[/opt/PostgreSQL/9.2]:
www.yiibai.com
一旦启动安装程序,它会询问安装密码,用户等,使用数据库的几个基本问题,如位置,端口号等因此,保持默认值就可以了,除了密码-可以提供一个密码。它将安装在