The link shared by Arun is comprehensive and includes every aspect
For a fresh 6.4 install, you'd follow the same steps for standalone install. Check the Deploying AEM section @ Adobe Experience Manager Help | Deploying User Guidebased on your requirements of standalone installation or app server installation and in case you want to set up a separate datastore. Once the server is set up, you could fix the source code and migrate it using package manager or vault tools or a similar tool.
Make sure to convert crx to oak using - java -Xmx4096m -jar aem-quickstart.jar -v-x crx2oak -xargs-- --load-profile <<YOUR_PROFILE>> <<ADDITIONAL_FLAGS>>
The above link is for in-place upgrade approach. I want to upgrade from AEM 6.2 to AEM 6.4 with new/fresh installation approach. Can anyone help with providing the detail and elaborate steps on how to proceed for this. Any help is greatly appreciated.