PostgreSQL installation in Ubuntu 10.04
PostgreSQL is a powerful and reliable object-relational database system. It's a great alternative for MySQL. It is as easy to set up, performs better and offers far more features.
To install PostgreSQL server run:
sudo aptitude install postgresql
Database users can be created in command line with createuser tool. Running the following command will create user 'kuba' who is not a superuser, can create databases, cannot create new roles and his password is stored encrypted. You will be asked to give new user's password as '-P' option is passed.
sudo su postgres -c 'createuser -S -d -R -E -P kuba'
Note: Run createuser with --help switch to get an overview of available options.
There is a similar tool for database creation called createdb:
createdb mydatabase
Note: Read about MySQL in my another post: MySQL installation in Ubuntu 10.04.
Comments
about 1 year ago wrote:What is the command to use the newly created user?
about 1 year ago wrote:@Newbie You need a client to connect to your database.
You could use psql by simply typing in console: 'psql -U kuba -W mydatabase'.
You could also install tools like pgAdmin or Tora if you preffer graphical interface.
about 1 year ago wrote:is it postgresql 9.0.1 ? unless it is how can intall 9.0.1 ?
about 1 year ago wrote:@erman Ubuntu usually has the most recent software. Currently it uses 9.4.x branch of PostgreSQL.
- Write a comment


















