For a linux server, IMHO, a good, secure and easy distribution is Debian : each version have 2 years time, so you could be quiet with no so older packages for Apache, MariaDB, Php ...
For OCS Server, here you have a lot of tutos for installation using 'sources' : surely the best to do, I don't recommand use of packaged OCS Server !
For Agent, you could use the agent supplied with distribution : even it could be older than server, it's not a problem ...