I have got redhat9 installed on my machine. I wanna install BerkeleyDB from source. How can I check the version of berkeley Db installed and the path to its library

thanks in advance