Equipment clearances and safe working space
All electrical components must follow proper requirements for clearances (space between one component and another object) given by manufacturers and by electrical codes. Requirements for clearances fall into two categories: clearances for ventilation and clearances to create a safe working environment. Often times the clearance requirements that a manufacturer makes in a product manual will be more stringent than the requirements outlined in an electrical code - the larger of the two requirements should be followed. In any case, it is important to use proper judgement when performing an installation. Equipment should be placed in a location that easy to access, provides proper ventilation, is clear of other objects (not used for storage), provides sufficient space in which to work, and is easy to exit in the case of emergency. Equipment should be installed in a height and location that is appropriate for the space and users.
Clearances for ventilation
All components used in off-grid PV systems generate heat when operating because they are not 100% efficient. The rated output or performance for a given component will always be measured at a specific temperature and temperatures in excess of that value will lead to reduced performance (lead acid batteries will temporarily have improved performance, but their cycle life will be shortened in compensation). This means that cooling, especially in warm climates, is very important and must be carefully considered to ensure that a system performs properly. If a particular component has clearance requirements they will be outlined in the manual or installation guide. Inverters and charge controllers will have specific required clearances, PV modules often do not give guidance, but there are guidelines available in the mounting systems page.
Safe working space
It is necessary to provide adequate space between any equipment that must be accessed for service or that have operable parts and other objects (including other system components and parts of a building like a wall) to enable anyone working on the system to do so safely and to permit access/exit in case of an emergency. Clearances for a safe working environment will be outlined in a country's electrical code. In any case, it is important to use judgement during an installation. Equipment should not be installed in spaces that are used for storage or that do not permit easy access/exit. Below are some example minimum clearances for width, height, and reach from the US National Electrical Code, which are sensibly based upon the minimum space that a person would need to safely work.