How is opening price of stock determined

How do stock exchanges establish the opening price for stocks?