Skip to content
cloudmanic edited this page Oct 27, 2012 · 47 revisions

Cloudmanic CMS is designed to be installed along side your custom web application. However, there is no reason you could not do a standalone install.

Assumptions

Steps To Install

  1. Using a text editor open / create - /var/www/example.com/public/composer.json

  2. In composer.json add the following json code

{	
	"repositories": [
		{
			"type": "vcs",
			"url": "https://github.com/cloudmanic/cloudmanic-cms.git"
		}
	],
    
	"require": {
		"cloudmanic/cloudmanic-cms": "dev-master"
	},
	
	"minimum-stability": "dev"
}
  1. Create a directory to act as the document root for Cloudmanic CMS.
mkdir /var/www/example.com/public/cp
  1. Install or Update your composer install. This will download and install Cloudmanic CMS.
cd /var/www/example.com/public
composer.phar install
  1. Create an index.php file and place it in the Cloudmanic CMS document root. Then add the following lines to the index.php
/var/www/example.com/public/cp/index.php
<?php
require '../vendor/autoload.php';
require CMS::boostrap('../vendor');

Make sure you adjust the path in the index.php to reference the vendor directory created by composer.

  1. Create a symlink to the assets directory. This will serve up our css, javascript, images for the CMS.
cd /var/www/example.com/public 
ln -s ../vendor/cloudmanic/cloudmanic-cms/assets assets

Make sure you adjust the path in my example above to reflect the location of your vendor directory.

  1. You need to configure the CMS to have access to the database. You can do that via a framework or by creating a config file.

  2. Cloudmanic CMS assumes you are using mod mod_rewrite. Create the following file: /var/www/example.com/public/cp/.htaccess

Then add the following to that file.

# Apache configuration file
# http://httpd.apache.org/docs/2.2/mod/quickreference.html

# Note: ".htaccess" files are an overhead for each request. This logic should
# be placed in your Apache config whenever possible.
# http://httpd.apache.org/docs/2.2/howto/htaccess.html

# Turning on the rewrite engine is necessary for the following rules and
# features. "+FollowSymLinks" must be enabled for this to work symbolically.

<IfModule mod_rewrite.c>
	Options +FollowSymLinks
	RewriteEngine On
</IfModule>

# For all files not found in the file system, reroute the request to the
# "index.php" front controller, keeping the query string intact

<IfModule mod_rewrite.c>
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
  1. We create a user so you can login right away. The email address is delete@me.com and the password is foobar. We highly recommend deleting this account right away, and creating your own.
Clone this wiki locally