Skip to content

How: Deploy CommonAccord Locally

HazardJ edited this page Dec 11, 2015 · 8 revisions

#Prerequisites

For a Mac user - and probably the same for a PC user - the easiest way is to install a package that has all the software needed to run the site. This is called MAMP. It can also be uninstalled by just removing it from your Applications folder.

#Clone the CommonAccord Repository

From the folder where you want the web application:

git clone https://github.com/CommonAccord/Cmacc-Org.git

.

==The rest, below, is the prior best (and only mediocre) shot at it. Still there bz might be useful. And the git part is the same.

Make sure you have these things installed on your system before trying to deploy CommonAccord.

#Clone the CommonAccord Repository

From the folder where you want the web application:

git clone https://github.com/CommonAccord/Cmacc-Org.git

Or go to https://github.com/CommonAccord/Cmacc-Org and do one of the choices, such as "Download Zip".

#Configure the Apache Web Server

Unfortunately this can be different depending on what sort of system you're running on.

Notes from Jim on Mac

  1. open System Preferences --> Sharing --> Web Sharing
  2. if there is no "Web Sharing" option, you have to activate it manually open Terminal and type: sudo apachectl start
  3. type 'localhost' in your web browser: it should say "It Works!"

Activate PHP

This can also differ by system.

If there is PHP configuration info in /etc/apache2/httpd.conf, open that file and uncomment the following line:

LoadModule php5_module libexec/apache2/libphp5.so

Then add the following FollowSymLinks option in the Documentroot section:

Options MultiViews FollowSymLinks

Then change the owner of the apache process in the section:

User <your_user_name>

In Ubuntu, add the following to /etc/apache2/mods-enabled/php.conf so that inline PHP is recognized:

<FilesMatch ".+\.html$">
    SetHandler application/x-httpd-php
</FilesMatch>

#Link the Org repository

Find the directory from which Apache Web Server is serving files.

On Mac, this is /Library/WebServer/Documents

On Ubuntu, this is /var/www/html.

cd /var/www/html
sudo ln -s /path/to/the/Org/repository commonaccord

In Ubuntu, apache won't follow the symlink for permissions reasons. Change the owner of the apache process by modifying apache2.conf:

User <your_user_name>

Start the Server

sudo apachectl restart

Go to your web-browser and load http://localhost/commonaccord

#On Mac OSX - if problem of Permission

If Mac says you don't have privileges: http://coolestguidesontheplanet.com/forbidden-403-you-dont-have-permission-to-access-username-on-this-server/

See also: https://discussions.apple.com/docs/DOC-3083

Clone this wiki locally