我在 CentOS 5 x86_64 VPS 中安装了 PostgreSQL 9.1,使用以下命令:
我指定了要安装哪个 Postgresql 版本,所以我选择 9.1,因为我想将开发环境和生产环境等同起来:
wget http://yum.pgrpms.org/9.1/redhat/rhel-5-x86_64/pgdg-centos91-9.1-4.noarch.rpm
Run Code Online (Sandbox Code Playgroud)
进而
yum install postgresql91-server
Run Code Online (Sandbox Code Playgroud)
最后
service postgresql-9.1 initdb
chkconfig postgresql-9.1 on
service postgresql-9.1 start
Run Code Online (Sandbox Code Playgroud)
完成所有这些并创建我的数据库后,我运行psql myfirstdb
并收到此警告:
Welcome to psql 8.1.23 (server 9.1.11), the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
WARNING: You are connected to a server with major version …
Run Code Online (Sandbox Code Playgroud)