桀昊j 发表于 2016-11-19 07:42:58

postgresql-9.2beta2 安装相关

  wget http://ftp.postgresql.org/pub/source/v9.2.0beta2/postgresql-9.2beta2.tar.gz
  ./configure && make && make install
  初次接触 安装时没有太多的参数。
  PostgreSQL installation complete.  安装完毕的提示
  然后新建用户组
  # groupadd postgresql
  # useradd -g postgresql postgresql
  # cd /home/postgresql/
  # ls -lah
  total 24K
  drwx------  2 postgresql postgresql 4.0K Jun 19 09:48 .
  drwxr-xr-x 11 root       root       4.0K Jun 19 09:48 ..
  -rw-r--r--  1 postgresql postgresql   24 Jun 19 09:48 .bash_logout
  -rw-r--r--  1 postgresql postgresql  176 Jun 19 09:48 .bash_profile
  -rw-r--r--  1 postgresql postgresql  124 Jun 19 09:48 .bashrc
  # vi .bash_profile
添加如下Path
export   PATH=$PATH:/usr/local/pgsql/bin
export   MANPATH=$MANPATH:/usr/local/pgsql/man
export   LD_LIBRARYPATH=$LD_LIBRARYPATH:/usr/local/pgsql/lib



Creating a Database Cluster
  $ initdb -D /usr/local/pgsql/data/
  The files belonging to this database system will be owned by user "postgresql".
  This user must also own the server process.
  

  The database cluster will be initialized with locale "en_US.UTF-8".
  The default database encoding has accordingly been set to "UTF8".
  The default text search configuration will be set to "english".
  

  fixing permissions on existing directory /usr/local/pgsql/data ... ok
  creating subdirectories ... ok
  selecting default max_connections ... 100
  selecting default shared_buffers ... 32MB
  creating configuration files ... ok
  creating template1 database in /usr/local/pgsql/data/base/1 ... ok
  initializing pg_authid ... ok
  initializing dependencies ... ok
  creating system views ... ok
  loading system objects' descriptions ... ok
  creating collations ... ok
  creating conversions ... ok
  creating dictionaries ... ok
  setting privileges on built-in objects ... ok
  creating information schema ... ok
  loading PL/pgSQL server-side language ... ok
  vacuuming database template1 ... ok
  copying template1 to template0 ... ok
  copying template1 to postgres ... ok
  

  WARNING: enabling "trust" authentication for local connections
  You can change this by editing pg_hba.conf or using the option -A, or
  --auth-local and --auth-host, the next time you run initdb.
  

  Success. You can now start the database server using:
  

      postgres -D /usr/local/pgsql/data
  or
      pg_ctl -D /usr/local/pgsql/data -l logfile start


Starting the Database Server
 
    $ pg_ctl start -l /usr/local/pgsql/log/pgsql.log
  server starting


页: [1]
查看完整版本: postgresql-9.2beta2 安装相关