If you’re running selinux and cant connect to your db , try this :
# setsebool -P httpd_can_network_connect 1
I use apg to generate random password all the time. On a new vpn server I built, apg was taking a long time to generate a pass, I traced it back to “not enough entropy”
You can see how much entropy you have with this command:
cat /proc/sys/kernel/random/entropy_avail
It should be at least in the hundreds, if its not you can use rng-tools to help you out.
sudo yum install rng-tools
echo “rngd -r /dev/urandom -o /dev/random -f -t 3″ >> /etc/rc.local
rngd -r /dev/urandom -o /dev/random -f -t 3
that should generate enough entropy and you can go back to doing some real work