Setting Up
Your
Local Dev
Environment
September 11, 2015
Rick Umali
@rickumali
http://bit.ly/setupdev0911
bit.ly/gitmol (code: lgmolcf)
PRODUCTION
DEVELOPMENT
Linux
Apache HTTP
MySQL
PHP
Learn from Primary Sources
Know Your Versions
Get a Good Base
Linux
Apache HTTP
MySQL
PHP
Linux
MySQL
Apache
PHP
Linux
MySQL
Apache
PHP
3306
80
Linux
MySQL
Apache
PHP
3306
80
mail
25 23
sshd
22
ftp
21
If conditions permit, go for Unix
Levels of Difficulty
1-4
Point and click installation
Light editing (configuration files)
5-6
Medium level editing
Some concepts beyond LAMP
7-8
Much more editing
More concepts beyond LAMP
9-10
You enjoy hours of tinkering
Unix Options
Mac
Good news! You’re already on Unix!
But you do have to install things on your own.
brew v MacPorts
Preciousness syndrome
Level of Difficulty: 4
Unix Options
Unix on a Windows Machine or Mac
Vagrant (Linux in a Box, aka “virtual machine”)
A little ‘removed’ from the desktop
Level of Difficulty: 6
https://www.vagrantup.com/
https://atlas.hashicorp.com/boxes/search
https://www.virtualbox.org/
Unix Options
Keep your OS, and go to the Cloud (AWS)
Free-tier is compelling
Watch your costs
Like Vagrant, but transferring files can be complicated
Level of Difficulty: 7
http://aws.amazon.com/
Unix Options
Wipe the OS, and go for Unix standalone
Forever tinkering
Preciousness syndrome
Level of Difficulty: 9
If constrained, go for all-in-one
If constrained, go for all-in-one
WAMP
Run Apache/MySQL directly in Windows
Packaged installation takes care of
configuration
Level of Difficulty: 6
http://www.wampserver.com/en/
Linux
MySQL
Apache
3306
80
Do-it-yourself
Install and Run Apache/MySQL directly in
Windows
Configuration all by yourself
Level of Difficulty: 8
Configuration and Logging
Configuration Files (YMMV)
Linux
/etc/rc*
Apache
apache2.conf File (and various subdirectories)
MySQL
Configured in /etc/my.cnf
PHP
Configured in /etc/php5/apache2
Log Files, Log Files, Log Files
Linux
/var/log
Apache
Enable /server-info, /server-status
/var/log/apache2
MySQL
Enable general_logging for detailed information
/var/log/mysql
PHP
/var/log/syslog
Setting Up VirtualHosts
# Larry Ullman code (2/10/2015)
127.0.0.1 phpmysql4.dev
/etc/hosts
/etc/hosts
<VirtualHost *:80>
ServerName phpmysql4.dev
DocumentRoot /home/rick/phpmysql4/www
# Larry Ullman code (2/10/2015)
127.0.0.1 phpmysql4.dev
DNS
<VirtualHost *:80>
ServerName tech.ricktest.com
DocumentRoot /var/ricktest.dev
Summary
Learn from Primary Sources
Know Your Versions
Get a Good Base
If conditions permit, go for Unix
If constrained, go for all-in-one
Configuration and Logging
Setting Up VirtualHosts
Thank You!
September 11, 2015
Rick Umali
@rickumali

Setting Up Your Local Dev Environment