We consider the channel selection problem in a cognitive radio network with heterogenous channel availabilities at different nodes. We formulate the maximum channel selection (MCS) problem as a binary integer nonlinear optimization problem, with an objective of maximizing the total channel utilization for all secondary nodes. We first prove that MCS problem is NP-complete. Then we design a centralized greedy channel selection (GCS) algorithm. The GCS algorithm is polynomial in computational complexity, and achieves a close-to-optimal (higher than 95%) numerical performance. We further propose a distributed priority order channel selection algorithm, which has significantly less signaling overhead compared with the GCS algorithm. We study the performance of the distributed algorithm both theoretically and numerically.