1. Click on the Apple menu bar and select 'System Preferences'.
2. Select 'Energy Saver' from the System Preferences window.
3. Click the Power Adapter tab and then move the slider beside 'Computer Sleep' to "Never" and un-check 'Put the hard disk to sleep whenever possible'.