Complex sentence: He told sailors to build a temple in Wanzhou island and release some chickens there which means using chicken to overcome the centipedes.
Split into simpler sentences: He told sailors to build a temple in Wanzhou (湾舟) island and release some chickens there. These behaviors mean that they were using chicken to overcome the centipedes.