Answering the second part of your question:
server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands, so you can query it
listen=1 is a bitcoin listening mode
daemon=1 starts bitcoind in the background as a daemon
rpcpassword=Q is the user/password for rpc access
rpcallowip=localhost means you can access it through rpc only from your localhost IP machine, add external IP if you want to access it from outside
rpcport=Y is the rpc port to access it (localhost:Y), for bitcoind the default is
AFAIK the second config won't work for rpc, you haven't specified rpcuser, and you will see the bitcoind output in the console (not a daemon).