Join Jon Peck for an in-depth discussion in this video What you should know, part of Learning Linux for PHP Developers.
I designed this course with the assumption that you don't have any experience with Linux or server administration. Therefore, every command and technique will be described and demonstrated in context, so nobody will be left behind. What if you already have some Linux experience? Don't worry, you can always learn more about configuration and best practices. This is a course for PHP developers, but it's not a PHP development course. You should already have a working knowledge of the PHP language and have written a few scripts. Without this background, you might not have enough context to follow along with what I'm doing, which will make it harder to enjoy and learn.
For some more background or a refresher, I recommend PHP with MySQL Essential Training with Kevin Skoglund here in the Lynda dot com online training library. Local web development is a very common need, and there's always more than one solution to a problem. For example, there's a number of web server solution stack packages that can be installed locally. XAMPP from Apache Friends dot org has distros for Windows, Mac, and Linux. There's also WampServer from Wamp Server dot com, which is only for Windows, and MAMP from MAMP dot info, which was designed for Macs.
Each of these options has their advantages and disadvantages, so I suggest you explore what's available. If you'd like to learn more about local web stacks, check out installing Apache, MySQL, and PHP with David Gassner here in the Lynda dot com online training library. Some of the demonstrations include setting up Git, which is a popular source code management and revision control system. No prior experience is necessary, and the use of Git is not required for the development server. However, it's extremely useful, and I strongly recommend some kind of source code management.
To learn more about working with Git, watch Git Essential Training with Kevin Skoglund, here in the Lynda dot com online training library. This course will be using PHP 5, which, at the time of this writing, is the current major version. PHP 5 is perfect for new and current development projects and should have no compatibility problems, but older and legacy applications may need to be updated. In those cases, and especially for custom code, I also recommend checking out the PHP documentation on how to migrate to PHP 5.5. One of the changes in PHP 5.5 is the inclusion of Zend Opcache, which is used for high performance caching and optimization.
As a result, Alternative PHP Cache, or APC, is no longer being maintained as an opcache and, therefore, is not included. This update should have no practical impact on the vast majority of developers, other than your code will run faster with less problems. Finally, a note about compatibility. Historically, the software used in this course is stable and forwards compatible, meaning that the instructions should work for future versions. With that said, software does update and evolve, and newer versions of some software may have a slightly different look and feel.
If that happens, don't panic. While a label, icon, or description may change, the functionality and intent will remain the same, and the instructions and guidance in this course will still apply. For convenience, links to download the exact versions of the software used will be available on the course homepage at Lynda dot com.
The demonstrations are performed with the Ubuntu LTS distribution of Linux, but the skills taught here are also applicable to other Linux distributions. Every command is described in detail in context, and a comprehensive quick reference is provided for convenience.
- What is Linux, and why should I use it?
- What's a LAMP, and why does it matter?
- Creating and configuring a virtual machine
- Working with the Linux command line
- Configuring the servers, including Apache virtual hosts
- Building a development server dashboard
- Using PHP package managers like Composer and PEAR
- Installing Drupal, WordPress, and more on the server
- Self-hosting Git repositories, including a web interface
- Enhancing the server with debugging and profiling
- Exporting a virtual appliance to use on another machine
- Server troubleshooting techniques
Skill Level Beginner
Q: The pecl installation of uploadprogress fails, saying it is not a valid package archive. How can I install uploadprogress?
A: There is a bug in Ubuntu's pecl that was introduced after the course was recorded; the workaround command is "sudo pecl install -Z uploadprogress"
Q: Where can I get the exact versions of the software used in this course?
Q: In Windows, git operations ask for a password. Why?
A: Make sure that pagent (PuTTY agent) is running and has the private key loaded. See Chapter 3, movie 4 for details.