Installation
Prerequisites
- PHP 4.x or 5.x installation
- MySQL 4.x or 5.x for database back-end
CMSity may run on any web server supporting PHP. We have tested it with Apache Web Server 2.2, lighttpd 1.4.19, Microsoft Internet Information Services 6.0.
Setting up the database
CMSity database must exists prior first cmsity run. CMSity shall have its own user and password giving all privileges for the database.
Important: CMSity database must be UTF-8, so when creating trough mysql command line, one must use:
CREATE DATABASE mycmsity DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Important: If you do not want to allow CMSity to have table create and drop rights, please import database structure from lib/schema.sql bundle file into your new CMSity database.
Setting up the files
CMSity bundle cmsity-VERSION.zip should be extracted and configured (mapped) at web server configuration (done automatically at hosting providers).
CMSity bundle cmsity-VERSION.zip contains empty folders uploads for file attachements and avatars for users' custom pictures. Ensure HTTP server has write permission to this folders.
Important: Please do not open the CMSity site yet. Complete steps below first.
Rewrite configuration (friendly-URLs)
CMSity bundle comes with .htaccess file that configures CMSity URLs for Apache. To set up URL rewriting for CMSity manually please use following configuration statements for following web servers:
Apache 2.x or IIS with IonicIsapiRewriter
# Put it into httpd.conf or .htaccess (Apache), IsapiRewrite4.ini (IIS6 with Ionic) # Optional: If rewrite-engine is not enabled by default # RewriteEngine On
RewriteRule ^files((?:/|$).*) ../files$1 [L]
RewriteRule ^(.*) lib/cms.php [L]
lighhtpd
# Put it into lighttpd.conf or conf-available/10-rewrite.conf (Debian installations) server.modules += ( "mod_rewrite" )
# Optional: If you have virtual servers # $HTTP["host"] =~ "(^|\.)mycmsityserver\.com$" {
url.rewrite-once = (
"^/files(/.*|$)" => "$0",
".*" => "/lib/cms.php"
)
# }
... system that do not support URL rewriting
CMSity can work without URL rewriting, however it will expose template files for running directly from URL, and expose main script filename in all URLs i.e. http://www.mysite.com/index.php/forum/bugs. We do not recommend running CMSity without URL rewriting.
Initial system and database configuration at config.php
Before CMSity can be run first, initial configuration at config.php has to be taken. Open config.php in any text editor and modify following items:
- $cms_db_server - database server hostname, in most of the cases "localhost" is proper value
- $cms_db_user - database username of user having access to CMSity database
- $cms_db_password - database user password
- $cms_root - relative root URL of CMSity installation, set it to "/" when it is installed at server root and URL rewriting is enabled, or to "index.php" if URL rewriting is not enabled, set it to "/subdirectory/" if CMSity is mapped to some subdirectory.
- $cms_xsendfile - set it to 1 is XSendFile module is enabled and installed, otherwise. XSendFile improves greatly performance of CMSity when serving binary files.
- $cms_lang - set it to your language using 2 letter code, i.e. "en" for English, "fr" for French. Set it to "auto" if Pro license is enabled and you want to have mutli-langual site.
- $cms_email - set it to your support e-mail address that will be used as sender address for all e-mails sent automatically by CMSity, i.e. "MySite Support <support@mysite.com>"
First run
Once we get everything set up, we my run CMSity for a first time. First run is very important moment when CMSity creates all its internal database structured and data, and sets up the administrator account.
If everything goes fine you shall see sample Welcome site giving you information about username and password. You may log now to CMSity and start customizing it.
Do not forget to change the password (and username) of the administrator before you will make your site public.
