There are a lot of factors to consider, but I think the simplest solution would basically boil down to an op amp in a non-inverting configuration with a fixed gain. If you need higher current, you may need to add a buffer in front of it.
Also keep in mind that if you run an op-amp on a regular 5V supply, it will not swing all the way to 5V, but will come pretty close depending on what you use. If this is just an amplifier for an ADC or something like that, this may be acceptable. If you absolutely need the voltage to swing all the way to 0 and 5 volts and not just as far as the op amp will swing for a 5V supply, you may need a positive supply rail higher than 5V.
What is the application?
Start reading at post#68 in this forum thread. A bit simpler than your post #6.hi every body
i have an analog signal from a sensor it is varying between 2.5 volt to 3.5 volt and i want to amplify it to (zero volt and 5 volt)
what is your suggestions
This is why I asked the OP ref the laser beam 'blocking' speed, an AC coupled amplifier could be a better solution.Good idea. You could have an AC gain much higher than the gain of 5 in my post above... If you block DC, then the amplifier adjusts itself (slowly) for ambient light changes.