As others have said, yes, both front and rear should be in the position where there is the least amount of cable pull when you are first putting the derailleurs on. However, I don't think that's entirely clear as you don't want to do this when you first start to try to adjust the gears:
1. attach both derailleurs on the bike (I'm assuming you have the correct height for the front derailleur worked out -look at the manual that came with the front derailleur -Shimano seems to always have a guide -otherwise google is your friend.)
2.run the chain through (again, assume you have worked out the correct length of the chain)
3. eye ball the front derailleur so that it's in the correct position for the chain in the smallest ring or the ring that has the least cable pull (this may involve adjusting the limit screws).
4. If you have a barrel adjuster (whether at the shifter or top tube) screw if out a couple of turns. Attach the front cable to the front derailleur, trying to keep enough tension just so it doesn't move the derailleur (you may want to manually push the front derailleur and and attach the cable at the same time to help this). There's no other way of saying this: it just takes a bit a practice. Note: if you are over tension, you can use the barrel adjuster to slacken the cable (you did turn it out a couple of turns, right?)
5. Once you've done this, you've installed the front derailleur roughly. Put your front shifter in the middle chainring position (or if a double, whichever front ring you use the most). This should shift your chain appropriately (it may be you have to adjust the cable tension and subsequently the limit screws -again, just a matter of practice with this.
6. Once your chain is in the most "neutral" front chainring position, you can attach the rear derailleur cable and adjust it. Again, make sure your rear shifter is at its shortest cable pull, and that your rear derailleur is in the correct position for the smallest gear, or at the shortest cable pull position (again, you may have to use the limit screws for this). Again, turn the adjuster barrel a couple of turns out.
7. install the cable to the rear derailleur in similar fashion to the front; that is, try to keep some tension (again you can push your derailleur a bit to help get this tension as you are attaching the cable) while not moving the rear derailleur out of position.
8. While the chain is in the front "neutral" chainring, you can go through the rear gears and adjust cable tension and limit screws appropriately. Once done, you can tackle the front derailleur for fine tuning. Keep in mind if you cross chain, you can't always expect perfect alignment -i.e. the chain might catch on the front derailleur.
Looking back, it seems like I've typed a lot -but it's really not that hard. Just a case of practice really and you do stuff without thinking about it. This certainly isn't the only way to do this, but just the way I tend to find works for me over the years, so adjust to your own preference.