Install Linux on it?
There's some out-of-date information here... https://docs.moodle.org/31/en/Obsolete:Step_by_Step_Installation_on_a_Mac_OS_X_Server which may give you enough of a clue.
Other than that it shouldn't be much different from any other PHP application.