1-click Webasyst installation

One-click Webasyst installation: a guide for hosting providers

Contents...

If your company provides web hosting services, we encourage you to offer your clients the one-click installation feature to quickly set up the Webasyst framework!

It is relatively easy to configure, and the framework is indeed installed in one mouse click: it takes only to choose the installation directory and to click on the "Install" button. Extraction of the distribution archive, setup of the database connection, assigning of the necessary permissions to files and folders — all this is completed automatically. Your clients would not need to download and extract the distribution archive, upload files via FTP, assign permissions, create a database, or specify database connection credentials.

Softaculous

One-click installation of the Webasyst framework is available by means of software library Softaculous, which supports integration with popular web hosting control panels cPanel, Plesk, H-Sphere, DirectAdmin, and InterWorx. View information about Webasyst on the Softaculous website at http://www.softaculous.com/softaculous/apps/frameworks/Webasyst.

If you do not use Softaculous in your web hosting company, then the implementation of the one-click installation feature will depend on the specific architecture of your company's control panel software. The general idea is to write a plugin (add-on) for your control panel, which should be able to perform the following actions:

  1. Download the framework distribution archive from the Webasyst server accessible at http://www.webasyst.com/download/framework/hostingkit/ (approx. 3 MB). This is a special framework version prepared for one-click installation. It differs from the basic version available on the website only through the installation method. The specified URL is always pointing to the latest version of the Webasyst framework containing applications Site, Blog, Contacts, and Stickies.

    You may set up caching of the distribution archive at your discretion.

  2. The downloaded distribution archive must be extracted into the installation folder chosen by the user.

    We suggest you implementing the installation folder selection interface by taking advantage of the available features of your control panel software.

  3. Set file write permissions for a) the Webasyst root installation directory and b) all files and subdirectories inside it. PHP scripts must have file write access to all Webasyst directories to ensure that your clients can add new applications at any time (applications are downloaded from the Webasyst server and are also installed in one mouse click).

    It is essential to allow the user of your server's operating system, under which Apache is running, to have full access to all files of the framework. If it is not possible for some reasons, then at least the following three subdirectories should be created and assigned full permissions: wa-cache, wa-data, wa-log. (It is important to be aware that in this case, due to insufficient permissions for directory wa-apps, installation of new applications using the Webasyst Installer will not work.)

  4. Create a database for the framework and configuration file wa-config/db.php with the following contents:

    <?php
    
    return array(
        'default' => array(
            'host' => 'HOST',
            'user' => 'USER',
            'password' => 'PASSWORD',
            'database' => 'DATABASE',
        )
    );

    If you decide to skip this step, then the user would have to create a database and enter connection credentials during the setup. This would definitely be not a one-click installation at all.

  5. Forward the user to the root installation URL http://INSTALLATION_URL/
    The user will see the Webasyst backend login screen and will be offered to enter a login name and a password (i.e. to sign up) in order to enter the backend.

  6. And the last but not least: email us at framework-en@webasyst.com to tell us about your successful setup so that we add your website to the list of web hosting providers supporting one-click installation of the Webasyst framework.

Plugin for cPanel

As an example we have prepared a ready-to-use plugin (add-on) for one-click installation by means of the cPanel: http://www.webasyst.com/wa-data/public/site/downloads/webasyst-cpanel-addon.zip (≈10 KB; developed in accordance with the documentation published on the cPanel website).

The archive accessible via the above link contains three folders: cPAddonsAvailable, cPAddonsMD5, Webasyst. To install the add-on to the cPanel, the following steps are required:

  1. Copy the entire archive contents to /usr/local/cpanel/cpaddons.
  2. Add line 'Webasyst' to the declaration of the %vend hash in file /usr/local/cpanel/cpaddons/cPAddonsConf.pm (see documentation):
    our %vend = (
    'Webasyst',
    );
    
  3. Download the framework distribution archive from http://www.webasyst.com/download/installer/hostingkit/cpanel/ and save it in folder /usr/local/cpanel/cpaddons/Webasyst/CMS/Framework as file named 1.1.1.tar.gz (automatic downloading of the latest version is not yet implemented in this plugin example).
  4. In WHM open the cPAddons Feature list (Feature Manager > Edit > Edit cPAddons Site Software Feature list), enable the Webasyst option and save the form data.
  5. If option Site Software is disabled in the Feature List, enable it and save the changes.
  6. Done! In cPanel section "Site Software" your web hosting users will see a link to install the Webasyst framework.