How to remove my apple account from my iMac?

I just bought a new imac yesterday and it asked me for my iphone's number.well i typed it up but now i regret it since i'm getting imesages on the mac. Problem with that is that this i won't be a private desktop, does any one know how i can remove my phone number?

Open Messages > Preferences > Accounts and select your Apple ID. Uncheck "Enable this account."

If you're setting it up for a library or coffee shop or something, you should make a new account and delete the one that has your Apple ID, just to be safe.