Join Jon Peck for an in-depth discussion in this video Exercise files, part of Learning Linux for PHP Developers (2014).
The exercise files for this course are contained in a directory for configuration files used in the course called conf, and the PHP scripts will be in a directory called php. In addition to the exercise files, a free quick reference to Linux and server commands covered in this course will be provided as a PDF. Feel free to print out and distribute this quick reference. Before we begin, you'll need to download a couple free programs. Secure shell, or SSH, is a secure method for remotely logging in to a command line and executing commands.
We'll be configuring the server over SSH, so you need an SSH client. For Mac, the terminal app is already installed in Applications > Utilities. For Windows, you can use the free program PuTTY to connect via SSH remote servers, available from the official PuTTY website. Use the Windows installer for everything except PuTTYtel to include all of the required programs. You'll need some way to edit PHP scripts. I'm going to demonstrate some basic code editing using the free program NetBeans IDE 8 PHP from netbeans.org.
NetBeans is a free, open-source, and cross-platform integrated development environment. You don't have to use NetBeans to use the server. There are many other IDEs, both free and commercial, that will work as well. I'm going to demonstrate how to connect to a database using a visual MySQL client. MySQL Workbench Community Edition available from dev.mysql.com is a free open source and cross platform MySQL client. It's useful for managing databases, including designing the structure, importing and exporting the content, and so forth.
You don't need MySQL Workbench to use the database server. Other MySQL clients will also work and we'll be installing phpMyAdmin on the development server itself as part of the course. With that said, I personally prefer a dedicated database client over a web client when dealing with large data sets. Use whatever tool is best for your needs. Finally, I'm going to demonstrate how to interact with a Git version control system using SourceTree, available from sourcetreeapp.com. SourceTree is a free, closed-source, cross-platform Git client.
It's unique in that it provides a graphical user interface, which some may find more approachable. Use of Git or SourceTree is not required to use the development server, but I recommend it.
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.