Cacti usually need direct or filtered sunlight to perform photosynthesis. Natural light can be supplemented by aftifical light such as flourescent lighting. Cacti have adapted to survive in solid clay and pure sand, with limited nutrients. But to grow more heathier cacti, they should be grown in a soil or potting mixture which provides free-draining and retains moisture. Always use a gritty mixture to harbor pests and diseases, and to ensure correct drainage.
Most cacti prefer a slightly acid soil.
To make soil more acid, add plenty of peat. Plants less than 6 in. For pots up to 3.5 in. Otherwise, use half pots, known as pans, which are 3-6 in. Make sure that all outdoor containers have drainage holes and line the bottoms with material such as turface or gravel.