Something went wrong. Try again later

frobie

300k or bust!

268 262594 32 90
Forum Posts Wiki Points Following Followers

Setting up the local environment

These are notes of how I set up my local environment. I am developing on a Mac, all commands are for the terminal.

vi /etc/hosts

  • added in an entry pointing the new site to my localhost
  • ex: 127.0.0.1 www.dev.newsite.com
  • will ask for password when saving an updated host file

install composer - https://getcomposer.org/download/

install laravel - https://laravel.com/docs/5.2

brew update

brew doctor

brew install php70 --with-fpm --without-apache --without-mysql --with-homebrew-curl --with-homebrew-openssl --without-snmp

  • there were a number of issues here that I forgot to note down :(

brew install php70-pdo-pgsql

  • edit php.ini and add in the pdo-pgsql.so extension

brew install nginx

  • installs nginx into /usr/local/etc/nginx/
  • added the following line to nginx.conf at the end of the http block: include /usr/local/etc/nginx/conf.d/*.conf;
  • create conf.d folder
  • created newsite.conf in the conf.d folder
  • the contents of the newsite.conf file: http://pastebin.com/8JmiUSTy

Followed the instructions after each install to copy the plist to the launch control directory. This will automatically start the services when the computer is powered on.

In some cases, I want to turn them off and on. Instead of using launchctl directly, I installed a wrapper called lunchy. Makes things simple.

With everything on and a database created, going to http://www.dev.newsite.com should display a page that says Laravel 5.

We're on our way!

Start the Conversation