Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 3.28 KB

INSTALL.OSX.md

File metadata and controls

75 lines (56 loc) · 3.28 KB

Installation on OSX

  1. Install XCode + CLI tools, if not already done.

  2. Install homebrew.

  3. Make sure you have a LAMP (Apache, MySQL, PHP) installation running. Madison has not been tested with Nginx. MySQL drop-in alternatives like MariaDB may work, but have not been tested. PHP 5.3+ is required. Additionally, make sure your PHP installation includes the mcrypt and libyaml modules.

  4. With homebrew, you can do brew install php56 php56-mcrypt

  5. Make sure in your apache settings that your apache config is loading the php5 module from you homebrew installed version, like so:

    • LoadModule php5_module /usr/local/php5/libphp5.so
  6. Install composer

  7. Or just put this in your terminal: curl -sS https://getcomposer.org/installer | php

  8. Install node and npm. We recommend using nvm

  9. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash

  10. Restart your terminal

  11. nvm install stable

  12. nvm alias default stable && nvm use default

  13. Install bower (easiest through npm). Yes, that's 3 package managers we've installed.

  14. npm install -g bower

  15. Run npm install so that it can grab the packages in packages.json.

  16. Run composer install to install all our PHP dependencies.

  17. Run grunt install which will run some more install commands, downloading and installing the required packages. You may run into an issue with Github's API ratelimiting your requests for composer install, see this workaround.

  18. If you don't have the grunt command, do npm install -g grunt-cli

  19. Install compass. If you do not have any ruby gems installed, you can get away with sudo gem update --system and sudo gem install compass, installing the compass gem on top of Mac OSX's ruby.

  20. In general, you will want to use something like rvm to manage a separate version of ruby which does not interfere with OSX. If you use rvm, drop the sudo from the aforementioned commands.

  21. Set up the site as an Apache vhost.

  22. Create a clean database in MySQL.

  23. Rename example_creds.php to creds.php and enter your DB info, as well as admin info for the initial admin user seed. Additionally, do the same for example_smtp.php if you want to enable email functionality (required for registering new users).

  24. Run php artisan migrate and php artisan db:seed from the root directory to set up the database.

  25. Install and run elasticsearch. See here for installation.

  26. Additionally, run curl -XPUT http://localhost:9200/madison when ES is running to create a new index.

  27. Copy the .env.example file to .env and set the appropriate variables.

  28. If you don't have one already, set up an account at MailTrap and set the MAIL_USERNAME and MAIL_PASSWORD variables to what it provides for your test inbox. This is needed for user signup.

Note

When editing any .js files, make sure to run grunt watch so that it can watch for and re-minify (among other things) the main build/app.js and build/app.map files.