There is equipment grounding and system grounding. for equipment grounding all metal casings and non electrical parts need to be connected to ground using porper ground connecting lugs/washers (grounding washers have little spikes to penetrate anodized coating on metal parts, dont connect copper directly to aluminium because of galvanic corrosion) and that includes the building. From you main panel you connect a ground wire directly to your houses grounding rod or install a new rod next to your shed (new rod only if the shed is far enough from your house so that you cant touch metal parts on both, otherwise there could be a difference in potential when there is a lightning strike nearby). I assume its a shed but either way if its a big metal building or a shed, each part (like each beam, metal sheet, metal door, etc) needs its own wire connecting it to ground or a different grounded part. You can find the thickness of the wires you need to use etc in the code book specific to the country/area you live.
Now for system grounding,
THERE CAN ONLY BE ONE NEUTRAL TO GROUND BOND, according to the manual of the 6000xp you can either connect or disconnect the internal neutral to ground bond, so when connecting them in parallel make sure only ONE has the internal neutral to ground bond or if you want to bond neutral to ground in your main AC panel i repeat AC panel make sure neither have their internal neutral to ground bond. Never connect the neutral wire to the ground, this is different for every inverter but in the manual for the 6000XP it says this
"All exposed metal parts of the system must be grounded regardless ofvoltage, including solar panel frames.DO NOT GROUND NEGATIVE PV LINES, ONLY SOLAR PANEL FRAMES!"
Also, just because something is grounded doesnt mean its safe here are some videos explaining ground faults
basics:
off grid:
in depth:
the guides posted by
chandlox are also a good resource (seems extensive and didnt see any mistakes taking a quick look at them)
lastly im not an electrician im just an engineering student so this advice is just as i think it probably is i might be right i might be wrong so always have a certified electrician inspect your system before using it, dont risk the lives of you and your loved ones to save a little bit of money