Depends how deep you want to go into that... I don't use local much so what I did was to download WAMP, which is some kind of pack - you just run the installer and then in http.conf change documentroot if you want and it's kinda all.
Other well-known pack is XAMPP.
But many people prefer installing everything separately and configuring it by themselves, with which I unfortunately can't help you, but I'm sure many others here can
Just - it's usefull to have you system prepaired for running of different servers/urls so either have stored various sets or just have one set of constants/variables for live and one for offline use
You can make it automatically adjust, so you can use the same config file on live and offline without modificating:if( $_SERVER["REMOTE_ADDR"] != $_SERVER["SERVER_ADDR"] )
{ // live
define("root", "...");
$connection = array("...",...);
bla bla...
}
else{ //local
define("root", "localhost://");
$connection = ....
}