Cmd line installer. [message #15061] |
Mon, 01 December 2003 05:08 |
melvyn
Messages: 7 Registered: December 2003 Location: Hilversum, The Netherland...
Karma: 0
|
Junior Member |
|
|
I was working on a 'FreeBSD-port' and that's not a big problem, but what you can't do, is really finish the installation.
Is there any chance we could work on a php cmd-line installer, which accepts environment variables for the various settings or better yet accepts a config file?
I guess the real challenge would be upgrading.
Melvyn
|
|
|
Re: Cmd line installer. [message #15066 is a reply to message #15061] |
Mon, 01 December 2003 11:11 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
There are a few logistical issues with the command line installer, which is why I had not written one. The actual code is much simpler then that of the web installer.
1) I'd require a shell account, something most hosted users do not have.
2) If you install the forum via CLI then the file ownership belong to the current user, not the webserver making requiring that many files & directories be chmoded 666/777 for the forum to function.
3) The upgrade process would have to run via CLI as well or the entire forum (every single file) will need to be chmoded to allow webserver write access.
FUDforum Core Developer
|
|
|
Re: Cmd line installer. [message #15070 is a reply to message #15066] |
Mon, 01 December 2003 13:07 |
melvyn
Messages: 7 Registered: December 2003 Location: Hilversum, The Netherland...
Karma: 0
|
Junior Member |
|
|
Ilia geschreven op ma, 01 december 2003 12:11 |
1) I'd require a shell account, something most hosted users do not have.
|
For a packaging system, this is not a problem as packages are installed via a shell account.
Quote: |
2) If you install the forum via CLI then the file ownership belong to the current user, not the webserver making requiring that many files & directories be chmoded 666/777 for the forum to function.
|
su -fm www -c "/usr/local/www/data-dist/fudforum/cli-install.php"
Ports require root in 99% of the cases anyways.
Quote: |
3) The upgrade process would have to run via CLI as well or the entire forum (every single file) will need to be chmoded to allow webserver write access.
|
Already solved in 2).
If you can lay out the framework you would like (ie: pack all files into cli-install.php again or just untar) I can hack along.
Melvyn
|
|
|
Re: Cmd line installer. [message #15072 is a reply to message #15070] |
Mon, 01 December 2003 13:36 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Ok, will do.
As far as the framework, the ideal solution that I'd go for would be a install-cli.php with the archive packed into the end of the file. The installer would ask the user questions on the terminal or alternatively read a config file from the current directory with all of the options.
FUDforum Core Developer
|
|
|
Re: Cmd line installer. [message #15092 is a reply to message #15072] |
Tue, 02 December 2003 00:47 |
melvyn
Messages: 7 Registered: December 2003 Location: Hilversum, The Netherland...
Karma: 0
|
Junior Member |
|
|
Any specific reason for that?
I can just as easily call upon /usr/bin/install or better move the 2 dirs to their specified locations and do a chown/chmod -R.
The FreeBSD port currently forces --enable-memory-limit, so you would need the 'make public webroot writeable hack' for the installer again.
I think things are much simpler, if the package/ports system would ensure the files are set in the right place, which when following hier(7) on FreeBSD would mean:
/usr/local/www/data-dist/${PORTNAME} for the webroot
and
/usr/local/share/${PORTNAME} for the writeables.
After doing that, put the dirs in the config and startup the installer.
What other things do you need for the file layout that would require the installer to have the files packed into itself?
PS: do you have a FreeBSD machine available, then I'll send you the port files.
Melvyn
|
|
|
Re: Cmd line installer. [message #15094 is a reply to message #15092] |
Tue, 02 December 2003 01:39 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
When working with cli, memory limit does not really matter because you can overwrite it. The installer generates many files that are dependant on the installation so even if you position 'static' files you'll still need to do work.
P.S. Unfortunately I do not have a development FreeBSD server.
FUDforum Core Developer
|
|
|
Re: Cmd line installer. [message #15116 is a reply to message #15061] |
Tue, 02 December 2003 22:54 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Here is the command line installer.
You'll need to prepend the archive to the end of it, like you would do for the web installer, you can find the instructions on how to do that in CVS topic in 2.6.0 discussion forum.
FUDforum Core Developer
|
|
|
Re: Cmd line installer. [message #15121 is a reply to message #15116] |
Wed, 03 December 2003 00:21 |
melvyn
Messages: 7 Registered: December 2003 Location: Hilversum, The Netherland...
Karma: 0
|
Junior Member |
|
|
Sleeptime now - I'll check this tommorow and see what I come up with. Looks pretty solid at first glance.
Melvyn
|
|
|