I am thinking of basing my new work project on Hyperic which would use PostgreSQL as the database. I don’t have prior experience with either of these, though, so it is quite a steep learning curve. Hyperic offers several ways to get started, and I have already tried their VMWare appliance which worked without a hitch.
Next I wanted to try an actual install. Again, there are several options, some of which include everything you’ll need. I started by installing the postgresql Ubuntu package. I had already installed sun-java 1.6 to be able to run Eclipse, so I didn’t touch that although the Hyperic documentation says Java 1.4 or 1.5 is required. Then I downloaded and installed JBoss without any problems. Then I downloaded the Hyperic tarball without the extras. But the Hyperic installation instructions and the setup script weren’t really helpful in getting me past the errors…
The setup script failed to connect to PostgreSQL. Digging more deeply and doing some web searches it seems many people have problems with PostgreSQL on Debian-based systems. The first problem is authentication, and the Debian defaults which err on the side of safety while leaving new users unable to do anything. Read on how to get past FATAL: Ident authentication failed error. I added two lines for my Hyperic database user to be able to connect from localhost using TCP/IP and also using local sockets. After editing pg_hba.conf I needed to restart postgres, but
sudo /etc/init.d/postgresql-8.3 restart failed because it could not read pg_dba.conf! This seems bizarre, and for now I just made the conf file world readable. A better way would be appreciated.
I was still kind of stumped, since I didn’t really know how to create databases or users, and I had no idea what the default password was. I got past that problem by finding the aptly named PostgreSQL on Ubuntu Linux – How To blog post, which informed me of the createdb command, and which SQL commands I need to run to create and edit users.
In retrospect I note that I should have read README.Debian.gz that came with the postgresql-8.3 package, as it would have saved me some headaches. It would have provided quick instructions on getting started if you followed it to the letter and created the database user with same name as your login name (which, frankly, I would probably never do).
The final piece that was hindering my Hyperic installation was that the setup script nor the instructions said anything about needing to create the database and the database user before running the setup script. I first created user “hq” and database “hq”, but it still didn’t work. Then I realized that the setup script error message said the database “HQ” did not exist. Creating all uppercase “HQ” database solved that problem.
- None Found