You have to start out by setting the mind on Right View. In other words, you use your discernment to gather together all the Dhamma you have heard. Then, when you set the mind on Right Resolve, that is also a way of establishing it rightly.
Then you set it on Right Speech, speaking only things that are right. You set it on Right Action, examining your actions and then forcing yourself, watching over yourself, to keep your actions firmly in line with what is right. As for Right Livelihood, you set your mind on providing for your livelihood exclusively in a right way. You are firm in not making a livelihood in ways that are wrong, not acting in ways that are wrong, not speaking in ways that are corrupt and wrong.
You will not make any effort in ways that go off the path, that is, you will not be mindful in ways that lie outside the path. You will keep being mindful in ways that stay on the path. You make this vow to yourself as a firm determination. This is one level of establishing the mind rightly.