Sunday, November 12, 2006

Upgrading PostgreSQL on RedHat 9

First, uninstall old version of PostgreSQL which was installed from RedHat 9 installation CDs:

rpm -e postgresql-server
rpm -e postgresql

After that, I downloaded the new version of PostgreSQL from http://www.postgresql.com. At the moment, the latest stable version is 8.1.5

I followed the installation step-by-step as described in INSTALL file, but no luck. So, I tried my own step:

1. su (this is supposed to be the third step, but I found error during make process)
2. ./configure
3. gmake
4. gmake install

After the installation was successful, a non-root user must be created, it was 'postgres' by default. So, you have to type '/usr/sbin/adduser postgres'.

By default, PostgreSQL was installed into /usr/local/pgsql/bin directory.

Create data directory manually by typing:

mkdir /usr/local/pgsql/data

and chown it:

chown postgres /usr/local/pgsql/data

Now, entering as user 'postgres': su - postgres
type '/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data'.
The command above is only done once. You don't have to repeat it everytime you start your PostgreSQL database.

Now, the database was successfully initialized and installed. Everytime you want to run the database server, just run the terminal, and type these commands:
1. su
2. su - postgres
3. /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data

Saturday, November 11, 2006

Installing wxPerl on RedHat 9

When I tried to install wxPerl on my RedHat 9, I found it was lack of so many perl modules.

First, I installed Module::Build. Everytime I tried to install, I got this error message: "Can't locate the perl binary used to run this script in..." I did googling and found the solution at this address: http://rt.cpan.org/Public/Bug/Display.html?id=19465. In short, you must type "unset LANG" from the terminal. It seems like this problem only occurs in RedHat.

The second requested module was Module::Pluggable. I downloaded it from cpan and I found out that it needed one module called Class::Inspector and two more modules which were too old, which were Test::More (0.47 from RedHat 9, >=0.62 requested, found in Test::Simple module) and File::Spec (0.83 from RedHat 9, >=3.00 requested, found in PathTools module). I downloaded and installed Class::Inspector and Test::Simple without any problem.

However, when I installed PathTools, I found this error while installing: "Module::Build is not configured with C_support". This could be solved by installing two more modules: ExtUtils::CBuilder and ExtUtils::ParseXS and reinstalling Module::Build. After that, PathTools could be installed successfully.

The third needed module was ExtUtils::MakeMaker. I installed it without any problem.

Then, it was time to build and compile wxWidgets from source. I downloaded the source from http://www.wxwidgets.org, the version I chose was 2.7.2. To install wxWidgets I run these commands below: mkdir buildgtk; cd buildgtk; ../configure --with-gtk; make; make install;
After that, compile STC: cd contrib/src/stc; make; makeinstall;
Back to buildgtk directory and run '/sbin/ldconfig'

The next module to be installed was Alien::wxWidgets. Before installing this module, some environment variables needed to be set:

WX_CONFIG="/usr/local/bin/wx-config"
export WX_CONFIG
LD_LIBRARY_PATH="/usr/local/lib"
export LD_LIBRARY_PATH

When Alien::wxWidgets was installed, it was time to install our main module: wxPerl. It was easy when you had reached this step. Just run: perl Makefile.PL; make; make install;

There were also demo for wxPerl which I tried to install. There were 5 more modules needed to install the demo itself. They were Class::Accessor, File::Slurp, File::chdir, IO::String, and UNIVERSAL::require.

The demo could be run although there were some parts which could cause Segmentation fault.

Wednesday, November 08, 2006

Installing Cream in RedHat 9

If you don't know what Cream is, it is an enhancement from Vim. If you want further detail, please visit http://cream.sourceforge.net.

I downloaded Cream, unpacked the package and went to its directory. It had no README stuff or INSTALL text file, but it did have an INSTALL.sh file. I supposed it was the installation file so I run it with './INSTALL.sh'. It exited and complained 'permission denied'. I run 'chmod +777 INSTALL.sh' and after that './INSTALL.sh' could run smoothly.

The installation procedure put an icon in the menu, but when I clicked it, it didn't run. I tried to find the cream executable file in /usr/bin directory, but I could not find it.

I went back to cream installation directory, copy the cream executable file to /usr/bin with this command: 'cp ./cream /usr/bin/cream' and 'chmod +777 /usr/bin/cream'. Now, I can run Cream smoothly. The shortcut in the menu also works perfectly. :)

Upgrading Vim in old RedHat 9

This post is still about upgrading old applications in RedHat 9 to newer version...

This time it was upgrading my favorite text editor: Vim. First, I removed all the default Vim installation. I unchecked Vim from System Settings - Add/Remove Applications. However, when I run 'rpm -qa | grep vim', I still found two Vim components, which are vim-common and vim-minimal. I just removed them from my system with these commands: 'rpm -e vim-common' and 'rpm -e vim-minimal'.

I downloaded the latest Vim, the version was 7.0 from http://www.vim.org (ftp://ftp.vim.org/pub/vim/unix/vim-7.0.tar.bz2). I unpacked the package, went to ./vim70/src directory and run:

make
make install

Voila... Vim 7.0 has been successfully installed. :)

Upgrading Gaim in old RedHat 9

I have a rarely used computer which then I decided to install Red Hat 9 on it. The installation itself was pretty smooth. When I started to login to the system, I realized that many applications were outdated.

I know that Red Hat 9 is quite outdated itself. :)

Gaim (http://gaim.sourceforge.net) which was installed from Red Hat 9 installation CDs was very outdated, the version could not even be used to login to Yahoo Messenger service. So, I browsed to http://gaim.sourceforge.net to grab the latest version. At the moment, the latest stable version is 1.5.Fortunately, there are rpm package for RedHat 9.

I uninstalled gaim from the command line by using this command: rpm -e gaim

After downloading the rpm package, I believed the installation was going to be easy, but I was wrong. I typed 'rpm -ivh gaim-1.5.0-0rh9.i386.rpm' to install, but then I got depedency error, that a file called libgtkspell.so.0 was needed. I searched for the file in rpmfind.net and downloaded this rpm: ftp://rpmfind.net/linux/dag/redhat/9/en/i386/dag/RPMS/gtkspell-2.0.9-1.rh9.rf.i386.rpm.

I installed the rpm which provided libgtkspell.so.0 and then I installed the gaim package. This time, the installation run smoothly without complains. :)

I used gaim successfully yo login to Yahoo and AOL network.