No, and yet both can be examples of socialism.
So then, you need to amend your definition to "Socialism is when the means of production are either collectively owned or state-owned," which is, again, essentially just saying "socialism is when the government owns stuff." And again, I completely disagree that state ownership inherently has anything to do with socialism. An absolute monarchy is 0% socialist, regardless of any services the king deems fit to grace the peasantry with.