Intro to article series
In this serie of articles I’m going to provide step by step instructions for setting up a fully working development environment for your Magento (or actually ANY PHP5) development project.
I start from the lowest level – from choosing the hardware and the article series will be finished with tips for tuning your Nginx, PHP5 and MySQL (MariaDB) to squeeze out the maximum performance that you need whole developing Magento.
About naming things
Here and there I call the database server as “MySQL” but what I mean is MariaDB 5.5.
Here and there I may call PHP5-FPM “PHP5” for the sake of shortness.
When I say PHP or PHP5 I mean the most recent version PHP 5.5.
OSX – I mean the current official version
10.8 Mountain Lion as of time of writing this post.
Words of warning or The Disclaimer
First – nobody is (unfortunately:)) paying me anything to promote their software. All choices have been made based on my loooong experience in this industry and some research I’ve done before and during writing if this article series. I’ll try to provide some more justification of choices made under every section for every important component.
Everything described in this blog must be taken
with caution. I mean –
think twice (and
measure 9 times!) before you put anything to production environments. I don’t take any responsibility or blame for data loss or loss of your job or whatever loss that may or may not be caused by following my instructions. In short – I write whatever I want and you’re the one that must think before executing anything written here. This is called “
talupojatarkus” or “common sense”
in Estonia🙂
Now when this is clear let’s get the hands dirty!
The structure of articles
I’ll give you instructions for 2 major development platforms – Linux and OSX. In general these 2 are perfect platforms for web development. One is free and open source while the other is commercial yet very good. Â So you have choice.
The articles are organised like this where all major bullets are articles:
- Introduction (current article)
- A few words about suitable hardware
- No promises made but still … (planning following articles)
- Underlying systems and processes
- Development process
- Version control process
- Choosing hardware and installing operating system
- Remove unwanted stuff
- Command line, Terminal app
- Naming and structure
- Development folders
- Development hostnames (virtual hosts)
- Usernames, passwords
- SSH keys
- Components installation & configuration
- MariaDB
- PHP5-FPM
- Socket or TCP?
- Nginx
- a special file /etc/hosts
- Openssl for HTTPS
- keys, self-generated certificates
- optional – phpMyAdmin
- Source Code Version Control
- git …
- … or svn. No and why?
- Bitbucket
- Github
- Beanstalk
- Security
- Bind MySQL to localhost
- Keep your sites closed when in public WIFI-s
- Use HTTPS
- Installing Magento
- create database, db user and password
- file permissions
- special folders
- .gitignore
- useful utilities
- Choosing the IDE
- Netbeans
- PHPStorm
- Others (Komodo, Zend Studio)
- Setting up xDebug for debugging your solution
- “Local” remote debugger
- Breakpoints
- Call stack
- Variables
- Remote debugger
- Performance tuning, tips and tricks
- MariaDB
- Nginx
- PHP5-FPM
I leave myself freedom to make improvements to the topics while the serie is developing.
Â
A few words about suitable hardware
Currently I use
Macbook Air with 4 GB RAM and I must say it’s too little. Magento is a big and hungry beast , all IDE-s are in hunger for more and more memory (
Java!) and when you want to use xDebug then you’re pretty much stuck. So MB Air can almost do with SSD saving the day but my next machine will be something with 8 GB of RAM or more. I guess nobody’s talking about desktops nowadays any more, right? Still – an iMac is good choice in case you don’t need to move around to much. Since I do a lot of consultation and solutions architecture I have to be in the meetings and it would be a bit tedious to haul an Imac or – even worse – a PC with a monitor around, right…:) OK, I’m joking but in short – a good laptop is a good choice nowadays. Choose a PC laptop or a Mac laptop based on budget or whatever the reasons are – I’ll provide instructions for both.
No promises made but still …
As a busy guy I cannot make big promises but I’ll do my best to provide you a minimum 1 article a week. Hopefully I can do better than this. Feedback is very much appreciated as my ultimate goal is to develop a solution that would be kind of standard for all Magento development projects that are yet to be launched. So all help and feedback and comments are welcome.
Provide feedback
Here’s the first request to you, dear readers – please provide your wishes in the comments about what you’d like to read about in this serie or if there’s anything important that I forgot from the TOC. Thanks!