how to setup openshift wordpress setup on localhost
have you look at their github account? they have openshift quick start for wordpress here:
https://github.com/openshift-quickstart/openshift-wordpress-developer-quickstart
install client tool here:
https://developers.openshift.com/en/managing-client-tools.html
UPDATES:if you are looking for host your own OpenShift, then you should look at OpenShift Origin:
https://docs.openshift.org/latest/getting_started/administrators.html
You can run openshift in a virtual machine.
see this.
But there is no reason why you shouldn't use a free openshift account and build it from your local machine (with git). It is a hassle at first but if you master it you won't have to reinvent the wheel when going live.
edit: focus on getting it to work on openshift, there should be a lot of documentation on it. The local environment is just your git repo running on your local machine.