OJS 3.0.2 Non-Interactive Command Line install

Hi,
I know the tools/install.php installation script, but it is interactive.

I would like to know if there is a way to install OJS 3.0.2 via command line but in a non-interactive mode. For example, passing a configuration file to the installation script.

Thank you,
Gustavo

1 Like

Hi @gnardin,

There’s not currently an official non-interactive installer – but see e.g. this wget command, which submits the installation form:

https://github.com/pkp/vagrant/blob/ojs-master/scripts/ojs.sh#L26

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Your suggestion almost work. The problem is that I am trying to deploy OJS at Heroku cloud and during the deployment phase the service is still not available and the “http://localhost/ojs/index.php/index/install/install” is not available.

I already asked Heroku whether I can activate the service before the end of the deployment, so I can call the command you suggested to configure OJS.

I let you know if I was successful or not.

Thank you,
Gustavo

Hi @asmecher,
I was successful in starting the web server during the deploy phase. The wget command you suggested was executed, but instead of installing the OJS the wget command returns me the HTML page as output and no configuration changes.

What am I doing wrong?
What kind of information I can provide so you can help me further.

Thank you,
Gustavo

Hi @gnardin,

That wget posts the installation form to OJS just as a web browser would, and OJS responds with its normal response for an interactive (web-based) install. I’d suggest grepping the output for a message confirming a successful installation.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,

I encapsulated the installation logic of OJS in an ansible role (https://github.com/uspdev/ansible-role-deploy-ojs) and I used a post request as sugestted by @asmecher (thank you).

Maybe it will work fine in Heroku