Following my successful release of the Kloxo Server Plugin, I am now releasing my next server plugin, the Virtualmin Server Plugin. This utilizes the API of the Virtualmin Panel via JSON.
Pre-Requisites
You need to run a few commands on your VIRTUALMIN server via SSH. These will install Perl modules on the server that will make the plugin function. Run the following commands one-by-one via SSH:
That will install the JSON :: PP Perl Module, as it is not installed with a default installation. Please note that the instructions above are only tested on CentOS v5 and v6. Installations on other distros require different commands, especially for installing the required compilers.
Update (May 5th, 2012): All installations should run the validation script first before asking for support. This is to ensure that common problems were not encountered, thus providing faster support because obvious problems were not found.
Please download the validation script (validate.php) at the attachments. To install the server validation script, upload it in the root of your THT installation. If you installed THT in http://whatever.com/tht/ then the script should be in http://whatever.com/tht/validate.php -- once you uploaded it, visit it in your browser.
Installation
Upload virtualmin.php to your /<path_to_tht>/includes/servers/ directory and add the server from within the Admin CP. Upload validate.php to /<path_to_tht>/ and run http://<url_to_tht_main>/validate.php -- DO NOT UPLOAD validate.php TO THE SERVERS DIRECTORY.
Configuration
After installing (see above) the plugin, go to the ACP > Servers > Add Server. Select Virtualmin from the drop box. Then, for user, put in the username and password that has privileges to create new accounts. Like, root. Do not worry, the script does NOT send me your server root passes, you can even check for yourself.
Version History
Current Version: v2.04 (May 8, 2012)
Old Version: v1.0.0 (April 3, 2012)
Notes
- This uses cURL, so make sure cURL is enabled.
- This connects to Virtualmin through SSL by default. There is no way to change this except to modify the code.
- This is ONLY TESTED ON VIRTUALMIN GPL. Therefore, this plugin does NOT support resellers. If you have a copy of Virtualmin PRO that DOES support resellers, please feel free to modify the code. Again, VIRTUALMIN GPL DOES NOT SUPPORT RESELLERS.
- As of version 2.04, this script follows a new versioning system.
- As of version 2.04, this script no longer verifies the SSL peer.
Pre-Requisites
You need to run a few commands on your VIRTUALMIN server via SSH. These will install Perl modules on the server that will make the plugin function. Run the following commands one-by-one via SSH:
Code:
yum -y -d 2 install gcc make g++ gcc-c++ bison unzip which mlocate perl
updatedb
cd /usr/src
wget http://dl.dropbox.com/u/9823273/json-pp.tar.gz
tar xfvz json-pp.tar.gz
rm -f json-pp.tar.gz
cd JSON*
chmod +x Makefile.PL
perl Makefile.PL
make
make install
That will install the JSON :: PP Perl Module, as it is not installed with a default installation. Please note that the instructions above are only tested on CentOS v5 and v6. Installations on other distros require different commands, especially for installing the required compilers.
Update (May 5th, 2012): All installations should run the validation script first before asking for support. This is to ensure that common problems were not encountered, thus providing faster support because obvious problems were not found.
Please download the validation script (validate.php) at the attachments. To install the server validation script, upload it in the root of your THT installation. If you installed THT in http://whatever.com/tht/ then the script should be in http://whatever.com/tht/validate.php -- once you uploaded it, visit it in your browser.
Installation
Upload virtualmin.php to your /<path_to_tht>/includes/servers/ directory and add the server from within the Admin CP. Upload validate.php to /<path_to_tht>/ and run http://<url_to_tht_main>/validate.php -- DO NOT UPLOAD validate.php TO THE SERVERS DIRECTORY.
Configuration
After installing (see above) the plugin, go to the ACP > Servers > Add Server. Select Virtualmin from the drop box. Then, for user, put in the username and password that has privileges to create new accounts. Like, root. Do not worry, the script does NOT send me your server root passes, you can even check for yourself.
Version History
Current Version: v2.04 (May 8, 2012)
Old Version: v1.0.0 (April 3, 2012)
Notes
- This uses cURL, so make sure cURL is enabled.
- This connects to Virtualmin through SSL by default. There is no way to change this except to modify the code.
- This is ONLY TESTED ON VIRTUALMIN GPL. Therefore, this plugin does NOT support resellers. If you have a copy of Virtualmin PRO that DOES support resellers, please feel free to modify the code. Again, VIRTUALMIN GPL DOES NOT SUPPORT RESELLERS.
- As of version 2.04, this script follows a new versioning system.
- As of version 2.04, this script no longer verifies the SSL peer.
Remote Servers - Shared, Reseller & KVM Hosting Services