To silence the ringer for Mac Messages, open the app and go to Messages > Settings. Click on the General tab. Then, under Message received sound, select None from the drop-down menu. This will turn off the ringer without affecting other sounds on your Mac.