IP.Board 3.4 - Installation via CLI

Update: By now this is no longer relevant as Invision Power have released v4 of their suite.

I've known that this should be possible for a while as I've seen the cli folder in the setup directory for the software. I've just never attempted it. Until now.

The following are the tools in which I am using to help assist me.

Presuming you've already got everything setup and ready; database credentials, ips installation mapped in homestead and have cd'ed into the IPS Suite root on homestead we can just skip to the action.

Looking nearing the top of the file reveals the following arguments for the script. (Kids please use something like the Symfony Console, it's much better and easier than rolling your own and relying on raw $argv/$argc)

$ cd admin/setup/cli
$ php install.php [APPS] [DIRECTORY] [URL] [LICENSE_KEY] [MYSQL_HOST] [MYSQL_DATABASE] [MYSQL_USER] [MYSQL_PASS] [ACP_USER] [ACP_PASS] [ACP_EMAIL]

I believe the parameters themself are pretty self-explanatory if you're up to using the CLI version of instaling the board, however there are a couple that do need a little explaining.

  • APPS - After looking into this appears to take a comma seprated list of applications such as core,forums,members,blog,ccs
  • URL - This needs to be the absolute url to your forum with a trailing slash e.g http://ips.local/

WARNING - Ensure that you always have core,forums,members in your apps otherwise you won't completely install the board or things will bork

Here's the command in action, use and replace if you want just make sure to update the license key parameter.

$ php install.php core,forums,members,blog,nexus,ccs,calender /home/vagrant/www/Poniverse/IPS http://ips.local/ YOURLICENSEKEY localhost ips_local homestead secret Test test adam@adamlav.in

Which might return a load of errors, it did for me, and final message of OK
(Note: The OK doesn't emit a newline afterwords so you're mostlikely going to see OKvagrant@homestead:...)

The errors I encountered installing it didn't seem to be blocking but I do have a working forum.

If you do wish to exlude the/get less errors then you can manually modify the installation code to do the following:

  • Remove function my_getenv( $k ) { return $_SERVER[ $k ]; } around line ~55
  • Above the require_once statements insert require_once( DOC_IPS_ROOT_PATH . 'initdata.php' );/*noLibHook*/

Fun Fact: I added everything from the normal zip download to git. During development of this article I managed to clear out the database, remove every generated file (git clean -f since they were untracked) and rerun that command to generate a clean forum in under 20 seconds...

Hope you enjoyed this, and find it useful.

comments powered by Disqus