How to create PostGIS database on PostGRESQL (case of Ubuntu)
PROBLEM:
I like to use PostGIS for my GIS work. Creating a GIS database inside PostGRESQL is not straigth forward. I mean just a couple of lines but I do it by hand. My problem is Ubuntu rep installations do not match to the documentation installations. Therefore, I wanted to take a note to myself in this post how do I do it; so I can use it in the future. Maybe you find helpful too.
SOLUTION:
Below you will find what is suggested by the documentation and my addition (in bold). It works for me this way !
$ createdb -h localhost -U postgres -w
$ createlang -h localhost -U postgres -w plpgsql
$ psql -h localhost -U postgres -w -d
$ psql -h localhost -U postgres -w -d
$ psql -h localhost -U postgres -w -d