Being a Windows developer I'm currently working on my own project using LAMP. I understand what I need to know of PHP and MySQL, but Linux looks huge and it's not clear where to start and what is enough given my goals. And my goals are to grasp general concepts, being able to deploy the project to a hosting provider and to be able to monitor the site's performance in order to spot problems, load issues, etc.
I know, the best solution is to get a Linux administrator to do that, but before I can do that I need to do it myself.
LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.
A LAMP stack is a bundle of four different software technologies that developers use to build websites and web applications. LAMP is an acronym for the operating system, Linux; the web server, Apache; the database server, MySQL; and the programming language, PHP.
The LAMP (Linux, Apache, MySQL, PHP) is one of the most popular cloud application stacks. The stack has many benefits, like easing of use. But the reasons why it became so popular and is still the go-to stack for most servers of web development companies can be attributed to its simplicity and popularity.
80% of your problems will be permissions. Windows does them differently; if you login as root (or with root-like privs) you can bypass permissions. Apache can't and won't.
Of the remaining problems, 80% will be PATH issues. PHP doesn't have as big a PATH issue as Java and Python, but they all use a PATH setting to find components and libraries. You'll get those wrong regularly. Windows has a PATH, but it also has a registry, making things either super easy or super secret. Unix keeps no secrets.
mod_php
. Write short echo $PATH
shell scripts to reveal what's going on.Of the remaining problems, 80% will be database related. After sorting out database permissions, you'll still have to get connected, and the "named pipe" vs. "localhost" stuff will be wrong in obscure, confusing ways. MySQL is very forgiving, but you'll make some mistakes here.
Of the remaining problems, 80% will be Apache configs. Apache is really simple, but has a million options. There's four ways to do everything, and you'll always try two that don't work at all, and settle for the third which will be icky. The fourth, which is much simpler, will never occur to you.
Of the remaining problems, 80% will be application use of the file system. If you try to open, read or write local files, you'll find that (a) permissions aren't correct on the directory you're trying to use [see above] and (b) the Unix file paths are different. Not a lot different, but enough different that something will break in an obscure way.
Of the remaining problems, 80% will be subprocess creation. Windows does this differently. One of the most important things in Unix is to remember that your subprocess is your child and you must actually wait for it to finish so the OS can clean up. If you think of a subprocess as a parallel "fire-and-forget" thing, you'll have zombie processes and be forced to do periodic reboots.
The remaining problems will be trivial application logic, but because of the platform differences, you'll blame Unix before you track down the bug in the PHP application.
Off the top of my head you'll need to:
These are only the basics. The next step is to realize when you have a problem and know where you can go to find out more information about it. Even with all this, it is only scratching the surface and many things may not make sense. It is a good start though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With