I'm following this blog post http://hendrelouw73.wordpress.com/2012/11/14/how-to-install-postgresql-9-1-on-ubuntu-12-10-linux/ to install postgres on ubuntu. These are steps two and three.
STEP 2: INSTALL POSTGRESQL ON YOUR SYSTEM
sudo apt-get update
sudo apt-get install postgresql-9.1
STEP 3: CONFIGURE YOUR POSTGRESQL PASSWORD
sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password';
However, I'm also looking at a RailsCast which installs postgres on ubuntu. First, Ryan Bates does this
root@li349-144:~# apt-get install postgresql libpq-dev
and then he sets a password like this
root@li349-144:~# sudo -u postgres psql
terminal
postgres=# password
Enter new password:
Enter it again:
So one big difference is in how the password is configured, in that the Railscast does not touch something called template
described in Step 3 of the blogpost
Looking at the instructions for installing postgres on ubuntu https://help.ubuntu.com/community/PostgreSQL, it is similar to Railscasts in that it doesn't have this reference to template
to create the user
Can you explain the difference and whether or not I should take this step?
STEP 3: CONFIGURE YOUR POSTGRESQL PASSWORD
sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password';