iHost Installation Manual

<!-- Unable to read content directory /www/sites/centova.com/wiki/doc/ihost/installation_manual/ -->

iHost Installation Manual

System requirements

  • PHP v5.x
  • MySQL v5.x
  • Apache 2.2+ or nginx 0.7+
  • PHP's libcurl and openssl extensions required for some functionality

Installation

  1. Upload the iHost folder to your web server's public_html directory. You can rename the iHost folder to any name you like (eg: billing, clients, etc.)

  2. Make the following folders (under your iHost directory) writable by the web server:

    /conf
    /media
    

    If you are a novice user, the simplest way to do this is by setting their permissions to 0777 with the chmod command. This will work fine, but it is insecure.

    If you care about security, however, you will need SSH access to the server to set the permissions properly. If you have SSH access, this can be done by running:

    cd /path/to/ihost
    chgrp nobody conf media
    chmod g+w conf media
    

    Replace "nobody" with your web server's UNIX user group. Usually it will be "nobody" or "www-data". If you are unsure, ask your web hosting provider.

  3. Create a MySQL database and write down the MySQL connection information. You would do this in phpMyAdmin or whatever interface your web hosting provider has made available for managing MySQL databases.

  4. If you wish to offer file downloads to your clients as part of the packages you sell, create a directory above your public_html for downloadable files. For example, if your public_html directory is located at /home/yourname/public_html, you should create a directory named (for example) /home/yourname/downloads or similar.

    This new directory must be made writable using the same procedure described in step 2 above (eg: set it to chmod 0777 or make it group-writable).

  5. To complete the automated installation, launch your web browser and visit the following URL:

    http://www.yourdomain.com/ihost_folder/install/

    Replace yourdomain.com with your actual domain, and ihost_folder with the name of the folder you used for iHost in step 1.

    The installer will prompt you for various information such as your MySQL connection details. Follow each step through to completion.

  6. After completing the web-based installation steps, delete the installation folder (/install) under your iHost folder. It is important to remember to remove this for security reasons.

  7. If you are using a web hosting control panel (cPanel, Plesk, etc.) you can likely skip this step and proceed to step 8.

    If you are NOT using a web hosting control panel, and you are managing your web server manually via SSH:

    • If you are using Apache, ensure that Apache's mod_rewrite module is installed and enabled. If it is not, install it, enable it, and restart Apache.
    • If you are using nginx, add the following to your nginx configuration file inside the server block for your web site configuration, replacing ihost_folder with the name of the folder you used for iHost in step 1:
    rewrite ^/ihost_folder/payment/return.php/.* /ihost_folder/payment/return.php;
    
  8. Next, you must configure iHost's cron jobs. The procedure for doing this may vary depending on how you access your server, but typically this step is performed by logging in to your web hosting control panel (eg: cPanel, DirectAdmin, etc.) and going to the Cron Jobs configuration section.

    • Select the option to create a new cron job. Under cPanel, you will need to select "Simple" mode.
    • For the command to run, enter the following:

      php -q /path/to/public_html/ihost_folder/cron/cronjob.php
      

      Replace /path/to/public_html with the actual path to your public_html directory (usually /home/username/public_html, where username is the username of your web hosting account) and replace ihost_folder with the name of the folder you used for iHost in step 1.

    • Set the cron job to run every 2 minutes. (This is a "master" job scheduler which will in turn dispatch all of the jobs necessary for invoice generation and so-on at the appropriate times.)

    Example cron job configuration:

    */2 * * * * php -q /home/username/public_html/ihost/cron/cronjob.php
    
  9. Your iHost installation should now be ready to use. You can log in to configure iHost at:

    http://www.yourdomain.com/ihost_folder/

    Again, replace ihost_folder with the name of the folder you used for iHost in step 1.