CGI script installation?

8 posts / 0 new
Last post
#1 Wed, 09/14/2005 - 09:25
MikeBratton

CGI script installation?

I'm new to Virtualmin and can't find anything on how to make script installation available to users or how to install cgi scripts. Or what script installers are already available. Is there documentation on this or documentation on writting custom script installers? I did read where Joe said this was a feature in Virtualmin Pro.

Thanks in advance!

Mike

Wed, 09/14/2005 - 10:10
Joe
Joe's picture

Hey Mike,

Yes, Jamie wrote a really nice modular script installer interface for Virtualmin Professional. It allows the administrator to choose which scripts are available to users, and if you know a little perl, creating new script installers is pretty easy. It's also possible to install new ones that others write--so, theoretically, someone who maintains a CGI or PHP project or product could offer a "Virtualmin Script Installer" that could be easily installed on a Virtualmin Professional system and it could be expected to work the same on all platforms that Virtualmin supports. Hopefully, that will actually happen, in the same way that RPMs and debs and such are sometimes offered by script projects...it would generally be easier to maintain (since only one version of the installer script is needed) and if Virtualmin Professional finds its way into a lot of hosting providers, it would be a large audience. We'll see how that shakes out.

Here's the list of currently supported script installers, that we're maintaining:

Advanced Guestbook 2.3.2
Advanced Poll 2.0.2
b2evolution 0.9.0.12-2005-05-06
Coppermine 1.3.3
dotProject 2.0.1
Drupal 4.4.2
Drupal 4.5.2
Drupal 4.6.0
FAQMasterFlex 1.0
Gallery 1.5
Help Center Live 2-0-2
i-dreams.net Guestbook 5.4
Nucleus 3.2
osTicket 1.3.1
PHP Support Tickets 1.8c
PHP Support Tickets 1.9
PHP-Nuke 5.0
PHP-Nuke 6.0
PHP-Nuke 6.5
Php-Wiki 1.2.9
Php-Wiki 1.3.10
phpBB 2.0.16
PHPCoin v122_full_2005-05-23
PHPList 2.9.3
PHPList 2.9.4
phpMyAdmin 2.2.7-pl1
phpMyAdmin 2.6.2-pl1
phpPgAdmin 3.5.3
PHProjekt 5.0
PHPSurveyor 0.98.final
TikiWiki 1.8.5
TikiWiki 1.9.0
WebCalendar 1.0.0
WordPress 1.5.1.1
Xoops 2.0.13
ZenCart 1.25d

So, it's already a pretty big list, and we're trying to keep an eye on versions so that we catch security updates when they are needed (but it's not been a focus since we haven't had many users of the Script Installers until this week when we began selling to real customers).

I wrote a brief bit about developing script installers over in the Developers forum, and I'll plan on creating a proper article about it for the documentation section of the site soon. I think it is a really nice feature of the Professional version (and a feature that one has to pay extra for from the competition).

As for how to get to it, the configuration of available script installers and installing new ones, has its own icon called "Script Installers" on the Virtualmin main page. Domain users will have a button labeled Install Scripts on their domain settings page.

--

Check out the forum guidelines!

Wed, 09/14/2005 - 10:26 (Reply to #2)
MikeBratton

Thanks Joe,

That is what I was looking for. Let me see if I can find it in Virtualmin...

Mike

Wed, 09/14/2005 - 11:00 (Reply to #3)
MikeBratton

Joe,

I'm not seeing an icon for "Script Installers" in my "Virtualmin Virtual Servers" module and I don't see how to add one using the Module Config page for this module. The only icons I do have are - Server Templates, New Mailbox Email, Bandwith Monitoring, Plugin Modules and Custom Fields. I don't have any of the icons in the second line of icons shown in the Administrative Guide on the website.

Mike

Wed, 09/14/2005 - 10:07
VernonSpangler

Are you referring to the plugin's for virtualmin?

Wed, 09/14/2005 - 10:19 (Reply to #5)
MikeBratton

Vernon

I am referring to what was said in this FAQ (listed below) from the website. How is this implemented?

"Q: Can my users automatically install CGI scripts using Virtualmin, like Fantastico for cPanel?

A: Yes. This was one of the things that kept coming up in our discussions with hosting providers who use cPanel: they love Fantastico. So we replicated the functionality. Even better, it has the ability for users and third parties to provide their own installers. So, if you have a script you'd like to provide to your users, you can write or have us or another third party write an installer for you and you then just drop it into your Virtualmin instance. It will show up just like the rest of the installers. It's very cool. You can also disable some for some or all customers for whatever reason...i.e. if it is a resource hog, or you don't like getting questions about a particularly buggy script. The Script Installer is all new in Virtualmin Professional, and it included at no extra cost. The installer API is available for third parties to provide additional script installers, and we encourage others to do so, either for sale or for free use by others, or as a means to improve the ease of use of your own commercial or Open Source CGI scripts."

After rereading this I see it uses the installer API...Is this the same as the "Shell API" or Remote API" or is this another API? Are any script installers already available?

Thanks!

Mike

Wed, 09/14/2005 - 11:17
Joe
Joe's picture

Hey Mike,

That's certainly strange. Did you, perhaps, already have Virtualmin GPL installed before running the installer? I'm not sure off-hand, but now that I think of it, this might cause the Virtualmin Professional module to not get installed (while everything not already installed would have been installed fine--so you'd see the new themes, new plugins, and perhaps some other stuff, but not the new Virtualmin module). Upgrading from the GPL version will be supported, of course, but it hasn't been tested at all, except for installations from .wbm packages rather than RPM.

If that's the case, try the following (I'll figure out a way to address this in a future installer, but for now upgrades will require a little intervention):

# mv /etc/webmin/virtual-server /etc/webmin/virtual-server.backup

# mv /usr/libexec/webmin/virtual-server /usr/libexec/webmin/virtual-server.backup

# yum install wbm-virtual-server

When that's done, you'll want to bring over the configuration from the backup you made:

# cp -a /etc/webmin/virtual-server.backup/* /etc/webmin/virtual-server

Hopefully this will do it. Let me know if anything gets lost in the upgrade, and I'll tell you how to fix it. I'll be experimenting with upgrades some this week and we'll hopefully have a reliable automatic method in place soon.

If you <i>did not</i> have Virtualmin GPL installed on the system before the installer ran, then we'll need to figure out what's going on before we can fix it.

--

Check out the forum guidelines!

Wed, 09/14/2005 - 11:43 (Reply to #7)
MikeBratton

Joe,

Now that you mentioned it... Yes I was testing Virtualmin (non Pro) on this box sometime back (I forgot, sorry). I followed your instuctions and now everything looks great! I probably should blow the whole thing away and start with a fresh test box however I will be installing this on a box I plan on replacing a production box with tonight to test the production setup.

Thanks!

Mike