You need to write the changes in vi before you can exit - :w to write and then :q to quit.
Networking in linux is pretty easy to setup - if you have a dhcp server on your network (and if you don't, you should!) then dhcpcd eth0 (or whatever nic your connecting to the network with) should grab an ip - assuming your using dhcpcd - i'm not sure if red hat uses it or pump, in which case it would be pump eth0 (i think). If you need to manually set the address you can do this with ifconfig (man ifconfig) or use linuxconf - whichever you find handiest.
Locking down your box is best done with iptables - if you didn't install them originally you'll need to recompile your kernel to use them - i don't think i'm the person to tell you about such complex operations as this so i'll pass you over to my good friend http://www.linuxdoc.org - do a search for iptables (and networking for that matter - i'm not the best at explaining things!)
As for books, i think its pretty hard to go wrong with anything by http://www.oreilly.com/ - they have an extensive catalogue of linux books.