Do I have osteoporosis? 7 years ago a knee doctor told me from my blood tests that I had a vitamin d deficiency but not calcium deficiency. I always drank coke/pepsi before blood test and since then. Sometimes I feel weakness in my knees when I walk

Take vitamin D. It is not feasible to know if you have osteoporosis without a special x-ray examination. However, if you were vitamin D deficiency you should take at least 2000 units of vitamin D3 every day.
Have a healthy diet, exercise 30 minutes/day, drink plenty of water, have safe sex, no tobacco alcohol weed or street drugs. For nutrition: http://www.choosemyplate.gov/.