If you can afford it, the best option is to have such photos done by a professional. If you prefer to do it on your own, it depends on your budget.
If you have a large enough budget and available space, get yourself a lighting kit with 2 fill lights covered by diffusers and be sure to use daylight-balanced bulbs of 250 watts or greater. Position each light a few feet away from the painting at roughly a 45 degree angle, one on either side. If your painting has a shiny surface (for example, if it's been varnished) then you will want to take care of avoiding glare spots. If you do experience some glare then adjust the positioning of the lights to reduce the glare without creating an uneven balance of lighting on the painting.
As for the camera, mount it on a trip od and point it straight on to the painting. If the painting is on a slight tilt (for example, leaned slightly back on an easel), then be sure to position the camera on the tripod so that it is leaning slightly down enough properly to line it up to match the leaning of the painting. Also, if your camera is a digital SLR, it's best if it is 6 megapixels or greater resolution. Set the picture mode to RAW (if that's an option) since you will be able to adjust color tones and values in Photoshop very easily without losing detail.
Even with that lighting setup, it's also good if you shoot during the daytime to allow for natural daylight as an added abient lighting support.
If you can't affort that lighting setup then your best option is to shoot during the daytime but don't have sunlight directly on your painting - you will end up with unwanted glares and hotspots. Instead, position the painting so as to maximize the daylight as ambient light without it directly hitting the painting. If your goal is for web sale, such as for allowing people to create prints, it is of great importants to minimize glare or taxture shadows that emphasize the texture of the canvas.
If your painting is very thick and you end up with too many unwanted shadows, you will need additional fill lights in yoru setup to help diffuse these shadows.
Lastly, to ensure your photos have the best chance at having the colors preserved, beyond just the use of the RAW picture format if it's available, make sure your color balance options in your camera settings match the environment you are shooting in. Turn off all special effects and use a non-distoring "straight" (non-zoom) lens set with the widest aperature possible. A 35mm-50mm lens is optimal.
When saving the file out, minimize the amount of compression used, with no compression as the best choice if your printer or web sale service allows for that. Also ask the printing service whether including an sRGB color space profile would be necessary when sending the files to them or if you should not include any color space profiles within the image files. They might be necessary if, for example, you were to do photo editing on the images.