Install PostgreSQL, 2004 April 12 authors on Linux: nios Matrix- dance with Java
From nios blog: http://www.matrix.org.cn/blog/nios/ Install PostgreSQL on Linux, I am really unforgettable. MySQL is a brisk dolphin, but lacks a number of modern relational databases, such as reference integrity, view, trigger, etc. Therefore, if you need to develop an e-commerce website, if you need these features, you may consider PostgreSQL. This article will briefly introduce the usage by its installation process on Red Hat 7.1. PostgreSQL's official download address is: ftp://ftp.postgreSQL.org/pub/v7.1.3/postgreSQL-7.1.3.tar.gzhtp://www.postgresql.org/ If you download the latest developments, you need Download and install the Flex (version number greater than 2.5.4) and Bison (version number greater than 1.28) Designers For security reasons, PostgreSQL cannot run with root users, so you must establish a corresponding user and group.
# UserAdd Postgre (Automatically establish Postgre Group) The process is not complex and other source version of the installation method Similar: Decompression to / usr / local / src: # tar xvfz postgreSQL-7.1.3.tar.gz # cd PostgreSQL-7.1 .3 # ./configure --prefix = / usr / local / pgsql # make # make install # chown -r postgre.postgre / usr / local / pgsql This is not all good, there are some ending work Do: # vi ~ postgre / .bash_profile Add: pglib = / usr / local / pgsql / libpGData = HOME / DATAPATH = $ PATH: / usr / local / pgsql / binmanpath = $ manpath: / usr / local / pgsql / manexport PGLIB PGDATA PATH MANPATH postgres user login, # su - postgre establish a database directory: $ mkdir data start the database engine: $ initdb [postgre @ www postgre] $ initdbThis database system will be initialized with username "postgre" .This user will own all the data files and must also own the server process. Fixing permissions on pre-existing data directory / home / postgre / dataCreating database system directory / home / postgre / data / baseCreating database XLOG directory / home / postgre / data / pg_xlogCreating template database in / Home / Postgre / Data / Base / Template1Creating Global Relations In / Home / Postgre / Data / BaseAdding Template1 Database .. Ase to pg_database Creating view pg_user.Creating view pg_rules.Creating view pg_views.Creating view pg_tables.Creating view pg_indexes.Loading pg_description.Vacuuming database Success You can now start the database server using: / usr / local / pgsql / bin / postmaster -D / home / postgre / dataor / usr / local / pgsql / bin / pg_ctl -d / home / postgre / data start $ postmaster -i -d ~ / data & [1] 22603 [postgre @