-
Notifications
You must be signed in to change notification settings - Fork 0
Installing
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.
- You have command line access to a Unix / Linux / OSX machine.
- Your domain is http://example.com
- Your document root for http://example.com is at /var/www/example.com/public
- You have some framework already installed that powers the bulk of http://example.com
-
Using a text editor open / create -
/var/www/example.com/public/composer.json
-
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"
}
- Create a directory to act as the document root for Cloudmanic CMS.
mkdir /var/www/example.com/public/cp
- Install or Update your composer install. This will download and install Cloudmanic CMS.
cd /var/www/example.com/public
composer.phar install
- 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.
- 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.
-
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.
-
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>
- 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.