Migration path from 2.4.7.1 on rhel 5 server - which migration path works?

Hi forum,

I want to move ojs installation from a old redhat 5 server to a new debian 9 server.
We currently run 2.4.7.1 on the rhel5 server, but would also like something newer.

I have a new debian 9 server which should be the new ojs server.

My first plan was to upgrade ojs on the rhel5 to newest version of ojs, and then install same version on the debian and copy database (export dump/import dump) and data.
However that plan failed because the rhel5 cannot meet the php requirements of ojs 3.1.1-4

So a new plan was made which was to install the old version 2.4.7.1 on the debian 9 server and then copy database and data:
However this plan also failed because the old version don’t play well with php 7.
I get the following error:

root@[myserver]:/var/www/html# cd ojs/
root@[myserver]:/var/www/html/ojs#  
root@[myserver]:/var/www/html/ojs# php tools/install.php
PHP Deprecated:  Non-static method PKPApplication::defineExposedConstant() should not be called statically in /var/www/html/ojs/lib/pkp/classes/core/PKPApplication.inc.php on line
545
PHP Deprecated:  Non-static method PKPApplication::getExposedConstants() should not be called statically in /var/www/html/ojs/lib/pkp/classes/core/PKPApplication.inc.php on line 51
3
PHP Fatal error:  Cannot use ‘String’ as class name as it is reserved in /var/www/html/ojs/lib/pkp/classes/core/String.inc.php on line 57
root@[myserver]:/var/www/html/ojs#  
root@[myserver]:/var/www/html/ojs#  
root@[myserver]:/var/www/html/ojs# php -version
PHP 7.0.33-0+deb9u1 (cli) (built: Dec  7 2018 11:36:49) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
   with Zend OPcache v7.0.33-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies
root@[myserver]:/var/www/html/ojs#

So which upgrade/migration path should I choose?

Regards
Anders