The most important thing is to rehearse your lines so many times that they just flow out of you naturally - then you won't have to think about the words anymore and can focus on the stage and your fellow actors. Don't sit down and read through them; walk around, add movements, speak out loud. A lot of people only practice in their head, but that doesn't work - you need the physical experience. And honestly, stage fright hits everyone, even professionals. That nervous feeling before the performance is actually a good sign; it keeps you alert and focused.
Think of rehearsals as your training ground. The director will tell you where to stand, how to deliver your lines - that's not something you have to get perfect on your own. Don't hesitate to ask if you're unsure about anything. Playing with your fellow actors also takes away a lot of the fear because you're up there together, not alone. And here's a little trick: before the performance, breathe deeply in and out, maybe do some light stretches to release the tension from your body. Some people also do progressive muscle relaxation - systematically tense and relax each muscle.
If it's a comedy especially, you've got it pretty easy: the audience wants to laugh, not critique you. They want you to have fun. That takes a lot of pressure off if you keep that in mind. Good luck!