Serving in a leadership position in the army and running a company have much in common, according to retired Gen. David Petraeus. The decorated US Army general and the former director of the CIA is now chairman of the New York private equity firm, KKR & Company. In his long and distinguished career, Gen. Petraeus has come to recognize that leaders have to perform certain key tasks, whether it is in a military or an entrepreneurial context.

I had the opportunity to interview Gen. Petraeus in my recently released book, A Paperboy’s Fable: The 11 Principles of Success. I asked him about the importance of cultivating leadership habits and overcoming obstacles, and how his experiences in the army translated to an entrepreneurial endeavor. Below are five tips for entrepreneurial success gleaned from the interview:

1. Leadership is an individual sport.

A focus on yourself to the exclusion of others can hurt your career, but effective leaders must be self-assured and confident in themselves. However, they should still be thoughtful and possess an intuitive feel for the needs of their people.

"Leadership is an individual sport, one that has to be fine-tuned to each of the people that reports to you,” says Gen. Petraeus. “Leaders also need to provide the direction, energy, encouragement and inspiration for each person who reports directly to the leader as well as for the overall organization.”

Related: 6 Traits of Exceptional Military Leaders That Apply in the Business ...

2. Teamwork is crucial.

In addition to listening to others and offering support, the best way to lead your team to a more resilient future is by acknowledging the contribution of others and allowing room for your team to innovate. According to Gen. Petraeus, “It has to be fine-tuned to each organization collectively that you have the privilege to lead.” Great leaders understand what drives their employees and provide perspective by acknowledging the needs of their team.

By embracing the objectives of a leader and uniting them with the individual goals of team members, a force stronger than the individual strengths of the group members will emerge. Productive team members also hold a strong sense of empathy, which will allow them to better understand the individuals in their group. This factor brings the team together to attack a common objective.

As Gen. Petraeus explains, “Life is a competitive endeavor, and that means that sometimes you are competing to be the best team player, not just best overall. Teamwork is critical.”

Related: 12 Tips for Fostering Teamwork

3. Step out of your (intellectual) comfort zone.

Gen. Petraeus relates that the best advice he received early in his career was from Gen. Jack Dowman. At the time, Gen. Dowman was a two-star commander, and Gen. Petraeus worked as his aide.

“He recommended that I seek experiences that would take me out of my intellectual comfort zone, such as going to graduate school,” says Gen. Petraeus. “I followed that advice, and he was right about the importance of such experiences to my individual development.”

Challenging yourself can enable you to perform at your peak. “Doing something that challenges you gives you a whole different outlook and makes you more receptive to change,” says Dr. Elizabeth Lombardo, therapist and author of Better Than Perfect.

Related: Why You Need to Step Out of Your Comfort Zone

4. To achieve great results, you need to be committed.

Real commitment means never taking the middle road. If you are not ready to fully commit to all the rigors of a business, you are better off staying at your current position. Whether they’re fully invested in their job or are starting a business, successful people must have the tenacity to commit to certain decisions that help mold them into elite entrepreneurs.

Gen. Petraeus credits many of his accomplishments to, “An ability to commit pretty relentlessly to a particular endeavor. The bottom line is, you really have to commit to something if you’re going to be successful in it.”

5. Learn from your experiences and recover.

What distinguishes a successful entrepreneur from the crowd is the ability to learn from past experiences and, more importantly, recover after failures. “We need to learn from our experiences and take responsibilities for our actions and drive on,” Gen. Petraeus explains. “We all have to strive to learn what motivates us, learn from our experiences, and what feels right and what feels wrong. There’s a strong component over the years to having formal processes that help to identify lessons that need to be learned, and actions that need to be taken. In other words, how do you find the big idea? What needs to change; what do we sustain?”

The truth is, failure is the gateway to success, and failure will most likely occur more times than you can count. As Gen. Petraeus says, “If you believe that you are pursuing the right course of action, then you need to have fortitude and have the strength to drive on. You have to keep trying to learn, keep trying to improve, keep trying to do better and achieve your objective.”