-
Notifications
You must be signed in to change notification settings - Fork 13
How: Deploy CommonAccord Locally
#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.
- Download MAMP from here: https://www.mamp.info/en/
- Install like this - pretty much download, click the package, follow instructions, launch the server. https://documentation.mamp.info/en/documentation/mamp/
- If that goes well and you get the MAMP home page, then ...
- Copy a CommonAccord repo - for instance by cloning via git (see below) into /Applications/MAMP/htdocs
- Open browser to http://localhost:8888/
- If you had the same luck as me, then the whole thing is ready to go. 10 minutes.
#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.
- Git
- Apache Web Server
- PHP
#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
- open System Preferences --> Sharing --> Web Sharing
- if there is no "Web Sharing" option, you have to activate it manually open Terminal and type: sudo apachectl start
- type 'localhost' in your web browser: it should say "It Works!"
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>
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/