how to install PostgreSQL on ubuntu
1. This installs the database server/client,some extra utility scripts and the pgAdmin GUI application for working with the database. $ sudo apt-get install postgresql postgresql-client postgresql-contrib 2. Now we need to reset the password for the ‘postgres’ admin account for the server,substitute in the password you want to use for your administrator account. $ sudo su postgres -c psql template1 3. That alters the password for within the database,now we need to do the same for the unix user ‘postgres’. $ sudo passwd -d postgres 4. Set-up the PostgreSQL admin pack that enables better logging and monitoring within pgAdmin. $ sudo su postgres -c psql < /usr/share/postgresql/9.1/extension/adminpack--1.0.sql 5. Edit the postgresql.conf file. Change the line: 6. Define who can access the server. This is all done using the pg_hba.conf. $ sudo gedit /etc/postgresql/8.3/main/pg_hba.conf add this text to the bottom of the file: 7. Now all you have to do is restart the server. $ sudo /etc/init.d/postgresql restart Reference: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |