Setting Up Your Local Dev Environment

Post on 19-Feb-2017

146 views 0 download

Transcript of Setting Up Your Local Dev Environment

Setting Up Your

Local DevEnvironment

September 11, 2015Rick 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

ApachePHP

Linux

MySQL

ApachePHP

3306

80

Linux

MySQL

ApachePHP

3306

80

mail25 23

sshd22

ftp21

If conditions permit, go for Unix

Levels of Difficulty

1-4Point and click installationLight editing (configuration files)

5-6Medium level editingSome concepts beyond LAMP

7-8Much more editingMore concepts beyond LAMP

9-10You enjoy hours of tinkering

Unix Options

MacGood news! You’re already on Unix!But you do have to install things on your own.

brew v MacPortsPreciousness syndrome

Level of Difficulty: 4

Unix Options

Unix on a Windows Machine or MacVagrant (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 costsLike Vagrant, but transferring files can be complicated

Level of Difficulty: 7

http://aws.amazon.com/

Unix Options

Wipe the OS, and go for Unix standaloneForever tinkeringPreciousness 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 WindowsPackaged 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*

Apacheapache2.conf File (and various subdirectories)

MySQLConfigured in /etc/my.cnf

PHPConfigured in /etc/php5/apache2

Log Files, Log Files, Log Files

Linux/var/log

ApacheEnable /server-info, /server-status/var/log/apache2

MySQLEnable 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 SourcesKnow Your VersionsGet a Good Base

If conditions permit, go for UnixIf constrained, go for all-in-one

Configuration and LoggingSetting Up VirtualHosts

Thank You!

September 11, 2015Rick Umali@rickumali