I'm trying to install ns-2.31 in fedora5
5? But that is an obsolete system. You can expect to have problems with it.
From what you wrote, it looks like you altered the default install directory. You need to locate the executable, and add it's location to your PATH.