Following Dr. Peterson's advice, lets START by labelling the cells a and b going from left to right in the top row, c, d, e, and f going from left to right in the middle row, and g and h going from left to right in the bottom row.
Now consider placing one of the integers other than 1 or 8 in cell d. Call it integer n. Where do you place integer n + 1? If you place n + 1 in cells a, c, e, or g, that cell containing n + 1 touches cell d containing n along an edge. But n and n + 1 are successive integers, and their cells must not touch. If you place n + 1 in cell b or h, that touches cell d at a corner. Therefore, you must place n + 1 in cell f. But then where can you place n - 1? No cell works. The same logic applies to cell e. Therefore, 1 and 8 must go in cells d and e. Let's try 1 in cell d and 8 in cell e. But then 2 must go in cell f and 7 must go in cell c. Now what?