Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic command line installation


sunil.sahoo

Recommended Posts

Hi there, 

Can anyone help me to automate the installation process through command line?

I want to automate the installation process with 1 command, could be php or curl by passing data  required in manual installation pages. I didn't find a way to do it.

Link to comment
Share on other sites

Are you looking to create a "one button" installer, like Softaculous etc.? I think that it's going to be a lot tougher than you think -- each installer has to be customized for the particular hosting control panel, OS, and other setup dependencies. Maybe you could do something with an API of glue routines to implement generic "commands" on the underlying control panel and OS work (sort of in the style of bytecode classes running on a bytecode runtime interpreter), but I'm not sure what you would have gained for all that work.

Perhaps you could tell us what you're trying to accomplish, what environment you're doing this in, and whether this will be widespread offering, or it's just for you (to install over and over, for whatever reason). I suppose that if you were setting up shop as an ecommerce consultant, it might be useful to quickly install a shop, but it might be worth the effort only if all your clients were on the same hosting service.

Link to comment
Share on other sites

Hello MrPhill,

I want a command line installer. I'm working on a project that require multiple time installation. And i want to automate that task with cron or bash script. This will be installed on aws/googleCloud linux servers in docker containers not windows servers. So i'm not working with cpanel. 
What exactly i'm trying to accomplish is something like  opencart cli-install. 

If that's not possible option 2:- How can i pass data to the form inputs  with curl and press continue buttons from command prompt

e.g 

curl -d DB_SERVER="127.0.0.1" -d DB_SERVER_USERNAME="root" -d DB_SERVER_PASSWORD="mariaSql" -d DB_DATABASE="oscom" -d DB_TABLE_PREFIX="osc_" -X POST install.php && curl -d HTTP_WWW_ADDRESS="" -d DIR_FS_DOCUMENT_ROOT="/var/www/html/" -X POST install.php?step=2 && curl -d CFG_STORE_NAME="oscom-store" -d CFG_STORE_OWNER_NAME="Sunil" -d CFG_STORE_OWNER_EMAIL_ADDRESS="[email protected]" -d CFG_ADMINISTRATOR_USERNAME="admin" -d CFG_ADMINISTRATOR_PASSWORD="socomAdmin" -d TIME_ZONE="Africa/Accra" -X POST install.php?step=3

Thank you for your time,
Have a nice day.

Link to comment
Share on other sites

Sorry, I don't know how something is packaged up into a "one click" installer, and I haven't worked with Docker. Since this is for a specific set of (Amazon and Google) platforms, all I can suggest is that you keep very careful notes as you go through a manual install process (for each), and then use those notes to build some sort of command line bash script to run the commands. Regarding web-page interactions during the install, something like cURL or Selenium ought to be able to do the job (fill fields, push buttons, read text), and would be kicked off from your bash script. Be very careful about checking, for instance, whether the desired database has already been created, etc. and check all command return codes. Unexpected error-reporting pages can be a real pain to deal with in a web interface (you need a general interface that at least recognizes a 404 or 500 page).

Only you can tell if the development effort to do this will be worth it (i.e., these installations will be an ongoing thing, done over and over for a long time). Don't forget that over time, there may be subtle changes to osC pages (as well as other subsystems) that will require you to update your scripts, after something breaks unexpectedly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...