IntroductionWelcome| 00:04 | Welcome to Up and Running
with Linux for PHP Developers.
| | 00:07 | I am Jon Peck, a Zend-certified PHP
engineer with more than a decade of systems
| | 00:11 | administration experience.
| | 00:13 | In this course, I'll show you how to
configure your Mac or Windows workstation
| | 00:17 | to be your own no-cost
private web development server.
| | 00:20 | In the end, you'll have an optimized
virtual server running like any other
| | 00:23 | program in your existing operating system.
| | 00:26 | The configuration you'll use is known
as a LAMP stack, and it's an extremely
| | 00:29 | popular and common
collection of web industry software.
| | 00:33 | The end result will be similar to a
hosted virtual private server, or a
| | 00:36 | VPS, except it will be much faster, cheaper,
and accessible only from your workstation.
| | 00:41 | Let's get started.
| | Collapse this transcript |
| Setting up your workstation| 00:00 | Before you begin, you'll need to
download a couple free programs.
| | 00:03 | First, you'll need to download
the server installation disk image.
| | 00:06 | You'll be using Ubuntu Server 12.04
Long Term Support 64 bit, which can be
| | 00:12 | found at ubuntu.com.
| | 00:14 | Make note of where you downloaded it.
| | 00:15 | You'll need to know where it is later on.
| | 00:18 | I'll go into greater detail about what
Linux is and why I chose Ubuntu in chapter 1.
| | 00:22 | Next, you'll need to download and
install VirtualBox, the virtualization product
| | 00:26 | you'll be using to host your
own private development server.
| | 00:29 | You'll be using version 4.1.16,
which can be found at virtualbox.org.
| | 00:34 | Complete the straightforward
installation, but hold off on configuration.
| | 00:38 | I'll explore what VirtualBox is, how you'll
be using it, and how to use it for your server.
| | 00:43 | To communicate with your server,
you'll need to get an SSH client.
| | 00:46 | For Mac the terminal application in
Utilities is already installed; for Windows
| | 00:50 | the free program PuTTY is a very
lightweight and powerful SSH client. Download
| | 00:54 | it from the official PuTTY homepage.
| | 00:56 | Other free and commercial solutions
exist, but for the methods you'll be
| | 01:00 | using, this will be fine.
| | 01:01 | Finally, some sort of IDE or text editor
is needed to edit your scripts and programs.
| | 01:06 | For the purposes of the demonstration,
I'll be using the free IDE NetBeans
| | 01:09 | 7.1.2 from netbeans.org.
| | 01:13 | You're not required to use NetBeans.
| | 01:15 | There are countless other IDEs, both
free and commercial, that will be compatible
| | 01:18 | with your development server.
| | Collapse this transcript |
|
|
1. Getting StartedWhat is Linux and why should I use it?| 00:00 | Before you start using a tool,
having context about what it is and why
| | 00:04 | it's being recommended will deepen your
understanding to the system that you're using.
| | 00:07 | It's never helpful to know that
you're doing something but be unable to
| | 00:10 | question or justify it.
| | 00:12 | Therefore, let's talk about Linux:
what it is and why it's a viable solution
| | 00:16 | for development work.
| | 00:17 | So, the encompassing question: What is Linux?
| | 00:20 | Linux is an operating system that
leverages free and open source software.
| | 00:24 | We'll run the software needed for our
development server on Linux, but what's
| | 00:28 | this free thing mean anyway?
| | 00:30 | Well, anyone can copy and reuse the software.
| | 00:33 | That does not necessarily
refer to the price of the software.
| | 00:36 | To quote the Free Software Foundation, think
of free as in free speech, not as in free beer.
| | 00:42 | With that said, most free software
in this sense does not have a price.
| | 00:45 | Commercial distributions of Linux
exist, such as Red Hat Enterprise Linux.
| | 00:49 | In these circumstances, you're also
paying for support and custom development.
| | 00:54 | So when you hear the term
open source, what does that mean?
| | 00:57 | Open source software refers to
computer software where the source code has
| | 01:00 | been made freely available
under a specific license.
| | 01:03 | Users are permitted to study, change,
improve, and sometimes distribute
| | 01:07 | open source software.
| | 01:08 | As the source code is freely available,
this facilitates collaboration, which in
| | 01:13 | turn can lead to a stronger product.
| | 01:15 | Why does this matter to you?
| | 01:16 | Well, cost per license become a thing of the past.
| | 01:19 | There's a wide variety of
enterprise-grade software for you to use that is pure
| | 01:24 | built, reviewed, and designed, which
allows you to focus on developing your own
| | 01:27 | core product rather than reinventing the wheel.
| | 01:30 | Open source software generally has a
large community-based support system
| | 01:34 | including wikis, forums, and Internet
relay chat. All of this is available to
| | 01:38 | you as resources.
| | Collapse this transcript |
| What options are there?| 00:00 | Saying that you're using Linux
is like saying you drive a car;
| | 00:03 | it's an extremely broad label.
| | 00:05 | While cars typically have four wheels
and an engine, Linux shares many specific
| | 00:09 | components and values.
| | 00:11 | With that said, there's a great
variety in both cars and Linux distributions.
| | 00:15 | There are thousands of
distributions of Linux, each with their own
| | 00:18 | unique qualities or goals.
| | 00:20 | We'll take a brief look at three of the
most popular and well-supported options:
| | 00:23 | openSUSE, Fedora, and Ubuntu,
which we'll use for our server.
| | 00:27 | openSUSE is the fourth most popular
distribution according to DistroWatch,
| | 00:32 | intended to be easily accessible
both in terms of acquisition and use.
| | 00:36 | Variants have been developed since 1994,
when it was formally known as SUSE Linux.
| | 00:41 | openSUSE is a community
program sponsored by Novell.
| | 00:44 | It recently drew criticism from
Linus Torvalds for usability issues,
| | 00:48 | especially around security policies
requiring root credentials to perform
| | 00:51 | everyday operations.
| | 00:53 | Fedora is a general-purpose Linux distribution.
| | 00:56 | It's currently the third most popular
Linux distribution according to DistroWatch.
| | 01:00 | The Fedora project was created in early
2003 when Red Hat Linux was discontinued
| | 01:04 | and split into the
community and commercial editions.
| | 01:07 | Fedora has a very short
life cycle of only 13 months perversion.
| | 01:11 | This can be very disruptive
when relying on a specific version.
| | 01:14 | Ubuntu, on the other hand, does not
suffer from the same sorts of issues.
| | 01:18 | Ubuntu is a fork or derivation of the
Debian codebase, focused on features and support.
| | 01:23 | It's the second most popular
distribution only to Mint, a fork of Ubuntu.
| | 01:27 | It's been around in various forms since 2004.
| | 01:29 | There is no specific
community group behind Ubuntu.
| | 01:33 | It's sponsored by Canonical,
which makes money selling support options for it.
| | 01:37 | Ubuntu has a very regularly release
cycle of 6 months with long-term support
| | 01:41 | versions being created every two years.
| | 01:44 | Each LTS server version is
supported for five years.
| | 01:47 | Ease of use, community and commercial
support, and popularity are among the major
| | 01:51 | factors that guided the decision to
leverage Ubuntu for our development server.
| | Collapse this transcript |
| What is VirtualBox?| 00:00 | Before I answer the question, what is
VirtualBox? I'll give you some context
| | 00:04 | about the concept of virtualization.
| | 00:06 | Virtualization allows an unmodified
operating system with all its installed
| | 00:10 | software to run in an environment
within your existing operating system.
| | 00:13 | Using this technique, you can
install a stock version of just about any
| | 00:17 | operating system like any other
program, instead of taking up an external
| | 00:20 | resource such as another machine or VPS.
| | 00:23 | For your purposes, a server-
optimized operating system will be used.
| | 00:27 | Oracle VM VirtualBox is a software
package that creates a special environment
| | 00:31 | that allows you to run a
virtualized operating system.
| | 00:34 | The container, commonly known as a box,
is self-contained, meaning it won't be
| | 00:38 | leaving bits and pieces of itself on
your hard drive and the resources it
| | 00:40 | consumes can be explicitly limited.
| | 00:43 | As of 2010, it's the most popular
virtualization product available.
| | 00:47 | It's free to use and extremely
versatile, making it a logical choice to use for
| | 00:51 | your development server.
| | Collapse this transcript |
|
|
2. The LAMP StackIntroducing the LAMP stack| 00:00 | Throughout this course, you will be
building and configuring what is commonly
| | 00:03 | known as a LAMP stack.
| | 00:05 | LAMP is an acronym for a solution stack to
build a viable general-purpose web server.
| | 00:09 | The letters refer to Linux, the operating
system in which the server software runs;
| | 00:15 | Apache HTTP server, the web server itself;
| | 00:18 | MySQL, which is the database server;
and PHP, the scripting language used.
| | 00:23 | Each of these components
are free and open source.
| | 00:26 | LAMP stacks are very common and can
be found on most commercial hosts,
| | 00:30 | meaning your development
environment will be extremely similar, if not
| | 00:32 | identical, to a hosted solution.
| | 00:35 | Often, technological needs can
be met with multiple solutions.
| | 00:38 | A LAMP solution stack, while common, is not
the only combination of components that
| | 00:42 | can be used for a web server.
| | 00:43 | There are lesser known variations of
the stack with other programming languages
| | 00:47 | such as Perl or Python
that have the same acronym.
| | 00:50 | As this course focuses on PHP,
there is no need to go into them.
| | Collapse this transcript |
| Why we're using Linux| 00:00 | Linux, the operating system that
you'll be using, is not the only operating
| | 00:04 | system that can be used as part
of a web server solution stack.
| | 00:07 | The two most common variants utilize
Windows, known as WAMP, and Mac OS, known as MAMP.
| | 00:13 | The reason this approach is not
recommended for local development is that it can
| | 00:16 | introduce additional variables to your
site configuration, and either Windows or
| | 00:20 | OS X are prepared out of the box for
the package management and encapsulation
| | 00:24 | that is available through virtualization.
| | 00:26 | This isn't to say that these
approaches aren't viable; however, the associated
| | 00:30 | overhead and potential for
compatibility and environmental issues makes them
| | 00:33 | better suited for very specific configurations.
| | 00:36 | Additionally, these configurations are
not commonly used in production contexts.
| | 00:40 | Developing in an environment that is
similar, if not identical, to production is
| | 00:44 | optimal for reducing local variations
and potentially unforeseen complexities
| | 00:48 | and complications that
may, at best, hinder progress.
| | 00:52 | In short, it's logical to be consistent
between development and production and
| | 00:56 | to use a tool optimized for your purposes.
| | 00:58 | So Linux will be the operating system of choice.
| | Collapse this transcript |
| Why we're using Apache| 00:00 | There are a number of web servers available.
| | 00:02 | While Apache is the most common,
commanding 64% of the market share according to
| | 00:06 | NetCraft's March 2012 web survey,
| | 00:08 | there are other alternatives.
| | 00:10 | Another free web server,
nginx, has a 10% market share.
| | 00:13 | Ngnix is an open-source web server
with a strong focus on high concurrency,
| | 00:18 | performance, and low memory usage.
| | 00:20 | When comparing Apache to nginx,
Chris Lea succinctly said, "Apache is
| | 00:24 | like Microsoft Word.
| | 00:25 | It has a million options, but you only need six."
| | 00:28 | ngnix does those six things, and it does
five of them 50 times faster than Apache.
| | 00:33 | The nginx stack, known as LAMP, performs
extremely well and is easily configured.
| | 00:38 | However, you will find fewer
commercial instances of this configuration and
| | 00:42 | overall there is less literature
available for nginx when compared to Apache,
| | 00:46 | which will not serve you
well if you want to learn more.
| | 00:48 | For these reasons, I have selected Apache.
| | Collapse this transcript |
| Why we're using MySQL| 00:00 | MySQL is a high-performance
SQL database management system.
| | 00:04 | According to MySQL, it's the world's
most popular open-source database with over
| | 00:08 | 65,000 downloads per day.
| | 00:11 | The most common open-source variation of
this stack would be PostgreSQL, known as a LAPP.
| | 00:15 | PostgreSQL is an object-
relational database management system.
| | 00:19 | MySQL is faster, but less full-featured,
while PostgreSQL is most comparable to Oracle.
| | 00:24 | MySQL is easier to use and manage in comparison.
| | 00:28 | Given the popularity and ease of use,
you'll use MySQL for your database.
| | Collapse this transcript |
|
|
3. Setting Up the Virtual MachinePreparing your workstation| 00:00 | We are going to prepare your
workstation to interact with a virtual server
| | 00:03 | that it will be hosting.
| | 00:05 | First, we're going to create a folder that
will be shared between the host and guest systems.
| | 00:09 | This is where your development
files and projects are going to go.
| | 00:12 | Throughout this course, I am going to
refer to the development environment that
| | 00:15 | we are making as a sandbox, which in
computer science refers to a testing
| | 00:19 | environment that isolates
untested code changes from the public.
| | 00:22 | It's also a good and short name that
clearly indicates the purpose of what we're doing.
| | 00:27 | Create a folder named sandbox in a
convenient location, such as your desktop.
| | 00:31 | As Linux is a case-sensitive operating
system, take care to name it in lower-
| | 00:36 | case to make your life easier down the road.
| | 00:38 | Next, you will need to make a small
change to your networking configuration,
| | 00:42 | in particular, adding an entry for your
local development server to your host's file.
| | 00:47 | A host file is kind of
like a networking address book;
| | 00:49 | it's the first place that is checked
to see what the IP address is for a
| | 00:52 | particular domain name.
| | 00:53 | The host file location is
dependent on your operating system.
| | 00:57 | For Windows, it's located in system
root, System 32/drivers/et cetera/hosts.
| | 01:03 | The easiest way to edit is to run
Notepad as Administrator and to open the file.
| | 01:07 | On a Mac the hosts file is located in
the et cetera/hosts. Modifying it from the
| | 01:12 | terminal using sudo nano
will be the fastest route.
| | 01:15 | sudo is a command that means super
user do, which is a concept that you'll be
| | 01:19 | using extensively on your
Linux development server.
| | 01:21 | I'll discuss sudo in greater detail in a bit.
| | 01:24 | You will only need to add one line to
your host file, and for both Mac and
| | 01:28 | Windows the line is the same: the IP
address 127.0.0.1, followed by a space, and
| | 01:35 | then host name sandbox.dev. Save the file.
| | 01:39 | In Notepad, go to File > Save;
in nano, press Ctrl+X+Y to save.
| | Collapse this transcript |
| Creating the virtual machine| 00:00 | If you haven't installed
VirtualBox, please do so before proceeding.
| | 00:04 | We're going to go to New
to create a new VirtualBox.
| | 00:07 | It'll open up a New Virtual
Machine Wizard. Click Continue.
| | 00:10 | We're going to enter a human readable name.
| | 00:12 | We'll use Sandbox. And for the OS Type
we'll select Linux for the operating
| | 00:17 | system, and for the version we'll
use Ubuntu 64 bit, and Continue.
| | 00:23 | For the memory the default is half a gig of RAM.
| | 00:26 | This is usually too little. I increase it to
2048, for two gigs of RAM, and click Continue.
| | 00:34 | Next we're going to create a new start-up disk.
| | 00:37 | The defaults are fine. We're going to
create a new hard disk. Click Continue,
| | 00:40 | which will open the new virtual disk
creation wizard. The file type VDI is fine.
| | 00:45 | The next question will be whether or
not you'd like to have it fixed size or
| | 00:49 | have it dynamically allocated.
| | 00:51 | The advantage of using a dynamically
allocated disk is that it will only use
| | 00:55 | space in your drive as it fills up.
| | 00:57 | It's a one-way path; once
it's expanded it won't contract.
| | 01:00 | And click Continue.
| | 01:02 | Next, you can select the location where
you want to put the virtual disk file.
| | 01:06 | If you're happy with the
default, just click Continue.
| | 01:09 | You will get a summary of the
new virtual disk creation. If you're
| | 01:12 | satisfied, click Create.
| | 01:14 | Finally, the New Virtual Machine Summary.
Again, if you're happy, click Create.
| | 01:19 | And now the Sandbox has been created.
| | Collapse this transcript |
| Configuring the virtual machine| 00:00 | Next we're going to
configure the virtual machine.
| | 00:03 | Select Sandbox and click the
Settings icon. Click Storage.
| | 00:08 | You will need to specify the server
installation medium, so click on the CD.
| | 00:14 | And over by CD Drive we're going to
choose the virtual image and go to Downloads
| | 00:20 | where we saved image and click Open.
| | 00:26 | Next we're going to configure the
networking, so we're going to go over to
| | 00:29 | Network, open up Advanced,
| | 00:32 | and we're going to do port forwarding,
which will allow you to access the local
| | 00:35 | development server from your workstation.
| | 00:38 | You're going to forward three
ports between the guest and the host.
| | 00:41 | Remember, the host is the operating
system that you're in and the guest will be
| | 00:45 | what is running within VirtualBox.
| | 00:47 | So go to the Port Forwarding and
click the plus icon to add a rule.
| | 00:51 | The first rule will be for HTTP or Apache.
| | 00:56 | This runs on port 8080 on your
host and port 80 on the guest.
| | 01:02 | This will allow you to
access it using your web browser.
| | 01:05 | Next, we'll add a rule for MySQL.
| | 01:12 | The Host Port will use 9306
and for the Guest Port, 3306.
| | 01:18 | And the final rule will be for SSH.
This will allow you to connect to your local
| | 01:23 | development server like a real server.
| | 01:25 | Here is the Host Port 2222
and the Guest Port of 22.
| | 01:33 | One important thing to note is that
when you forward these ports to your local
| | 01:36 | machine, even though they are nonstandard,
the ports will be exposed unless you're
| | 01:40 | firewall blocks them.
| | 01:41 | Well there is a low probability of a
security breach in the circumstance,
| | 01:45 | especially given the prevalence of
routers that do not forward ports to
| | 01:48 | the outside by default,
| | 01:49 | it's still important to know.
| | 01:51 | Consider if you set up a virtual server
on your laptop and disable the firewall,
| | 01:55 | then went to an airport or another
public place. Utilize best security practices
| | 02:00 | and protect your work just like
you would with any other program.
| | 02:03 | Now you are all set. Click OK.
| | 02:06 | Finally, we'll go to Shared Folders.
| | 02:08 | I'm going to click the plus folders
under the folders list. The Folder Path.
| | 02:14 | I'll choose the folder, or in this case
the Sandbox folder that we created on
| | 02:18 | the desktop. Click Choose and we're
going to select Auto-mount, so every time
| | 02:25 | that the virtual operating system is booted
it will mount this folder, and click OK and OK.
| | 02:32 | The Sandbox is now configured.
| | Collapse this transcript |
| Installing Ubuntu Server 12.04| 00:01 | Next we're going to install Ubuntu.
Select Sandbox and click the Start icon.
| | 00:06 | The first time you do this a warning
will appear telling you that the keyboard
| | 00:09 | has been captured. This means that whatever
you would type will be in the virtual machine.
| | 00:13 | To get out of this mode press the Host
key. It will be displayed at the bottom
| | 00:17 | of this message. By default on Mac
this will be the left Command key.
| | 00:20 | You can safely tell VirtualBox
not to show that message again.
| | 00:25 | The mounted server
installation media will now boot.
| | 00:29 | Select the language for the
installer and select Install Ubuntu Server.
| | 00:35 | Again, we will select the language for
the installation and select the location.
| | 00:41 | For Configure the Keyboard you don't
have to detect the keyboard layout. Select
| | 00:45 | the country of origin and
the layout and continue.
| | 00:50 | For the network configuration it'll
ask you for the host name for the system.
| | 00:53 | We can leave it on the default and continue.
| | 00:56 | Next we're going to be setting
up the first user and password.
| | 00:59 | Enter your full name and the username
for your account. Enter a password and
| | 01:07 | again to verify. I chose a weak password
because this is a development server
| | 01:11 | and not forward facing, and I wanted
something that was easy to remember.
| | 01:15 | In a production context
I would use a much stronger password.
| | 01:19 | The next question will be whether or
not I wish to encrypt my home directory.
| | 01:22 | I do not wish to do this as this
potentially degrades performance and since this
| | 01:26 | is local to my development
machine, it won't be a problem,
| | 01:29 | so I'm not going to encrypt my home directory.
| | 01:32 | It'll ask you if the detected time
zone is correct. If so, select Yes.
| | 01:37 | We're going to use Guided use
entire disk for the partitioning method.
| | 01:40 | There is only one choice
for the disc to partition.
| | 01:45 | It'll ask you if you wish to write
the changes to the disk. Say Yes.
| | 01:51 | Now that the base system has been installed,
we're going to configure the package manager.
| | 01:55 | Enter your proxy information for
your network or blank for none.
| | 02:01 | The next question will be
how you wish to handle updates.
| | 02:05 | As this system will not be running all
the time, we'll select No automatic updates.
| | 02:09 | We'll choose the packages
that we wish to install now.
| | 02:12 | We'll install OpenSSH server, which
will allow us to remotely administer our
| | 02:16 | development server, and LAMP server,
which will install Apache, MySQL, and PHP.
| | 02:21 | And go to Continue.
| | 02:24 | The next step will be to enter a
password for the root user for MySQL.
| | 02:28 | I use root in the context of
a local development server.
| | 02:31 | In production it would be
something much more secure.
| | 02:37 | The next question regards the GRUB boot loader.
| | 02:39 | It'll ask you if you wish to write it
to the master boot record. This allows
| | 02:42 | you to choose which operating system that
you're going to boot on the virtual machine. Say Yes.
| | 02:46 | On the completion of the installation,
you're virtually mounted CD-ROM drive is
| | 02:53 | ejected, and you can safely
continue. This will reboot your machine.
| | 02:59 | Now that the installation is
completed, you can go up to Devices and select
| | 03:04 | Install Guest Additions.
| | 03:06 | This will mount the installation CD
with the software that facilitates
| | 03:09 | communication between the host
and the guest operating system.
| | 03:13 | You can minimize the window now.
| | 03:16 | At this point we've completely
configured VirtualBox and completed the
| | 03:19 | installation of the operating system.
| | 03:20 | The environment of your server
is now ready for customization.
| | Collapse this transcript |
|
|
4. Configuring the ServerLogging in using Secure Shell (SSH)| 00:00 | While you can log in to your server using the
terminal in VirtualBox, you won't be able
| | 00:04 | to do things like copy and
paste from the terminal.
| | 00:06 | To get around that limitation we're going
to connect to your local development server
| | 00:09 | using Secure Shell, also known SSH.
| | 00:12 | Not so coincidentally, this is the same
technique that you would use to administer your remote
| | 00:16 | server. By default SSH runs on port 22. As part
of our VirtualBox configuration, you forwarded
| | 00:22 | the port to 2222 to avoid
any potential conflicts.
| | 00:26 | On OS X, type the following commands from the
terminal: ssh followed by -l for login, type
| | 00:32 | the username that you specify during the installation,
then -p for port 2222, and the hostname sandbox.dev.
| | 00:40 | If you're using PuTTy or another SSH client
connect, to sandbox.dev using the username
| | 00:47 | that you specified on port 2222.
| | 00:50 | The first time that you'll log in you
will be asked if this is a known host.
| | 00:54 | You will say Yes. And we'll type the
password that you specify during installation.
| | 00:59 | You will get a command prompt, and you're
now logged in to local development server.
| | Collapse this transcript |
| Working with the command line| 00:00 | Now that you've logged in, let's get
acquainted with the Linux environment.
| | 00:03 | Most commands are named relatively
logically, after their usage in English.
| | 00:07 | The first command I'll show you
is man, which is short for manual.
| | 00:11 | Most commands in Linux are
documented in this manner.
| | 00:13 | To read a manual, type man,
then the name of the command.
| | 00:16 | To navigate you can use the up
and down keys, then press Q to quit.
| | 00:20 | For example, you can use man man to
read the documentation on the man command,
| | 00:28 | and then press Q to quit.
| | 00:31 | The next command you should learn
is ls, which lists directory contents.
| | 00:36 | By default the results are pretty bare-
bones, but combined with the arguments
| | 00:40 | - la, you will get a comprehensive
look into a directory, which by default is
| | 00:45 | the current directory.
| | 00:47 | Now that we've seen how to get a directory
listing, let's actually change to a directory.
| | 00:51 | The command to change directories is cd.
| | 00:54 | Let's change to the system's
temporary directory, then list the contents.
| | 00:58 | cd/var/tmp, ls -la to list the content.
| | 01:05 | Not a lot to see right now, however,
let's go to a more useful directory, the log
| | 01:10 | files, cd /var/log and ls -la.
| | 01:15 | This is where many log files live,
including the web server and email logs.
| | 01:20 | If you wish to see the contents of a file,
you can use to Concatenate command on a file.
| | 01:25 | Like the others, the command's name
is representative of the use and is a
| | 01:28 | shortened version, in this case just cat.
| | 01:31 | One of the files in the log directory is
dmesg, which stands for display message.
| | 01:36 | It's the message bar from the core of
the operating system known as the kernel.
| | 01:39 | These should look vaguely familiar
to you, as it was shown during boot.
| | 01:45 | That's a lot to read in one sitting and
often there is no need to see the whole
| | 01:49 | file, only the beginning or the end.
| | 01:51 | With log files, the end is
usually the most important part.
| | 01:54 | The beginning and end of a file
can be accessed in a simple manner.
| | 01:58 | The easiest way to remember the commands is to
think of a cat again. A cat has a head and a tail.
| | 02:03 | The head is at the start
and the tail is at the end.
| | 02:06 | Therefore, if you only want to see the first
part of a file, you will use the head command.
| | 02:10 | By default only the first ten lines are shown.
| | 02:14 | This shows the very first
messages that the kernel put out.
| | 02:17 | Next, look at the end of the file.
| | 02:21 | Similar to head, the last 10 lines are shown.
| | 02:24 | Tail has one more trick;
| | 02:25 | it can actually follow a file, always
showing you the last 10 lines in real time.
| | 02:29 | This is incredibly useful for
watching the contents of a log file.
| | 02:33 | Look at the end of another file, the dpkg log.
| | 02:35 | This file shows log entries from
installing software using the Package Manager,
| | 02:40 | tail -f, for follow, then dpkg.log.
| | 02:45 | As there's not a lot going on in the system
right now, there is probably not a lot to see.
| | 02:49 | Tail with a follow argument will be more
useful with things like the web server log.
| | 02:52 | I will get to that in a later
chapter. Press Ctrl+C to exit.
| | 02:57 | The more command is a simple method of
allowing a console user to page through
| | 03:01 | with the contents of a
file one screen at a time.
| | 03:04 | Take another look at dmesg,
but this time using more.
| | 03:09 | Now that you're looking at a file, there
are some commands you should be aware of.
| | 03:12 | Enter will go forward one line.
Space will go to the next page. F will go
| | 03:18 | forward one page. B will go
backwards one page. And Q will quit.
| | 03:23 | sudo is a program that allows you to
run programs with the security privileges
| | 03:27 | of another user. By default this user is root.
| | 03:30 | The name sudo is the combination of the
su command, which allows you to use the
| | 03:34 | shell of another user, and
do, meaning to take action.
| | 03:38 | Think of sudo like trying to
access the backstage of a concert.
| | 03:41 | If you just try to walk in,
the bouncer won't let you get past.
| | 03:44 | However, if you show them your
special sudo badge and say your secret
| | 03:47 | word, he'll let you in.
| | 03:49 | To use sudo, just type sudo, followed by
the commands that you wish to execute.
| | 03:54 | Most of the instructions in
this chapter require sudo.
| | 03:57 | Earlier, when I edited the host file on
this workstation, elevated privileges
| | 04:01 | were required, and the sudo command was invoked.
| | 04:03 | If we try to edit that same file
without sudo, it will appear as read only.
| | 04:10 | Exit and edit the file using sudo
for access, and you will have full
| | 04:19 | write permissions.
| | Collapse this transcript |
| Upgrading and installing packages| 00:00 | Ubuntu uses the Advanced Packaging tool
known as APT to handle the installation
| | 00:04 | and removal of software.
| | 00:06 | Since the initial publication of Ubuntu
12.04, security updates, bug fixes, and
| | 00:11 | enhancements have become available;
| | 00:13 | therefore you'll update the packages that
were on the installation CD using apt-get,
| | 00:17 | the command line's tool in
APT for managing packages.
| | 00:20 | First you'll update the list of
available software. sudo apt-get update.
| | 00:30 | Next, you'll update all the
currently installed packages.
| | 00:33 | You'll pass the argument -y to the upgrade
command, to automatically say yes to any prompt.
| | 00:38 | If you want to get a chance to
see what's going to happen before it
| | 00:40 | executes, leave off the -y.
| | 00:42 | sudo apt-get -y upgrade.
| | 00:46 | While Ubuntu comes with a vast
majority of the software that you'll need,
| | 00:53 | there is a couple of extra tools
that will need to be installed.
| | 00:55 | You'll use the apt-get command again,
this time passing both -y and -q as arguments.
| | 01:00 | y will say yes to any prompt and q will
minimize the amount of stuff displayed
| | 01:04 | to you during the installation.
| | 01:06 | The first four packages are
required for VirtualBox Guest Additions,
| | 01:09 | the connection between Linux, the guest
operating system, and your host operating
| | 01:13 | system, in particular the shared folder.
| | 01:16 | The packages required for VirtualBox
Guest Additions are build-essential, common
| | 01:20 | tools used for compiling software;
module-assistant, and a tool for managing
| | 01:24 | kernel module packages; linux-headers,
which are the Linux kernel headers--we'll
| | 01:29 | use a shorthand to install the version
currently installed using uname, which
| | 01:32 | plans system information; and dkms,
the Dynamic Kernel Module Support,
| | 01:38 | a framework which allows kernel modules
to be dynamically built for each kernel
| | 01:42 | on your system in a
simplified and organized fashion.
| | 01:45 | Next, you'll also include the
commands for dealing with a common file
| | 01:48 | archive format, zip:
| | 01:50 | zip, which packages and compresses or
archives files, and unzip which lists tests
| | 01:55 | and extracts compressed files in a zip archive.
| | 01:58 | The final command will read as
follows: sudo apt-get -q -y install
| | 02:06 | build-essential module-assistant linux
-headers-$(uname -r) dkms zip unzip.
| | 02:23 | Occasionally, when you're typing a
command, you might get something off by just a
| | 02:26 | little bit. You can use the arrow key
up to display the last command; use the
| | 02:31 | arrow key left to move your cursor;
and in my case I missed the letter S, so
| | 02:37 | just type s and press Enter.
| | 02:41 | The packages are now installed.
| | Collapse this transcript |
| Installing VirtualBox Guest Additions| 00:00 | Now that you've installed all the
requirements, you can install the guest additions.
| | 00:04 | Earlier, you told VirtualBox to make the
guest additions installation available
| | 00:07 | on your guest operating system.
| | 00:09 | These guest additions will set up a
shared folder between the guest and
| | 00:12 | host operating system.
| | 00:13 | On your Linux server the
folder will be /media/sf_sandbox.
| | 00:18 | I'll go into greater detail
about this directory later on.
| | 00:21 | You'll use the command mount, which
will attach the file system found on a
| | 00:25 | particular device to the file tree.
| | 00:27 | First you'll use sudo for the
elevated privileges, give the mount command,
| | 00:33 | followed by the device that you wish to
mount, /dev/cdrom, and the destination in
| | 00:41 | the file system, /media/cdrom.
| | 00:45 | Next you'll execute the installer,
including the arguments that indicates that
| | 00:49 | the installation will take place from the
command line and not in any Windows system.
| | 00:53 | Despite this you get a warning
about Windows system drivers.
| | 00:56 | It's a long-standing minor
bug that is safe to ignore.
| | 00:59 | So sudo for elevated privileges,
sh /media/cdrom/, and the next part is going to
| | 01:09 | be a little bit long, but
we're going to use a shortcut.
| | 01:10 | When using a command line in Linux
you can type the first couple letters,
| | 01:15 | capital VB, lowercase ox, uppercase L
and then press Tab and it'll
| | 01:20 | complete the Command, space--nox11.
nox11, that means don't install anything
| | 01:30 | for the Windows system.
| | 01:31 | Press Enter and it will
complete the installation.
| | 01:36 | As previously stated, the Windows
system drivers are not applicable.
| | 01:39 | This error message can be safely ignored.
| | 01:42 | The VirtualBox Guest
Additions have now been installed.
| | Collapse this transcript |
| Configuring the Apache web server| 00:00 | To facilitate interactions between the
host operating system, the web server, and
| | 00:04 | your Linux user, you'll need a little glue.
| | 00:06 | First add your user to the
VirtualBox group, which will give you the same
| | 00:10 | permissions as the VirtualBox Guest
Additions, and in particular to any
| | 00:13 | folders that are shared.
| | 00:15 | To do that you'll use the usermod
command, which modifies system account files.
| | 00:19 | This is not something you'll be doing often.
| | 00:21 | In this instance, you're adding the user
jpeck to the group vboxsf. sudo usermod
| | 00:28 | -a -G for the group,
vboxsf and then jpeck, the user.
| | 00:35 | Next, you'll add to the Apache web
server user to the VirtualBox group.
| | 00:39 | This will allow the web server to make
changes to the shared files. sudo usermod
| | 00:45 | -a -G vboxsf www-data.
| | 00:51 | URL rewriting is an extremely common
technique for improving the ease of use and
| | 00:55 | search friendliness of an application.
| | 00:58 | The Apache component, known
as a module, is off by default.
| | 01:01 | We'll execute the Apache command to
enable the module. a2, short for Apache2;
| | 01:08 | en, for enable; mod, for module; followed by a
space and the module name, in this case rewrite.
| | 01:16 | You'll also need to tell the web
server where you shared folder is and
| | 01:19 | what domain to use.
| | 01:20 | To do that, you'll need to
make a new site configuration.
| | 01:23 | We're going to use the text
editor nano to edit the file.
| | 01:26 | There are many text editors
available, but nano is, admittedly subjectively,
| | 01:30 | the easiest to learn.
| | 01:31 | You can move your cursor around using
the arrow keys and to exit press Ctrl+X
| | 01:35 | and follow the prompt.
| | 01:37 | You'll pass an additional argument, -w,
to disable wrapping of long lines. sudo
| | 01:42 | nano -w /etc/apache2/sites-available/sandbox.
| | 01:51 | You can copy and paste the contents of
the free exercise file to save you time.
| | 01:55 | Exit, Ctrl+X and save the file
press Y. It will ask you which file to
| | 02:00 | write. Press Enter. Then enable the
site configuration using the Apache
| | 02:04 | command, a2ensite, Apache2 enable
site, and then the name of the site that
| | 02:10 | you wish to enable, sandbox.
| | 02:13 | Apache will give a minor error
until you give it a proper name.
| | 02:16 | While it can be safely ignored, it's best
practice to properly configure your system.
| | 02:20 | The solution is straightforward:
| | 02:22 | specify the server name in the
Apache web server configuration.
| | 02:25 | We're going to create the Apache
configuration with the following command: sudo
| | 02:29 | nano -w/etc/apache2/httpd.conf.
| | 02:37 | I'm going to specify the server
name where this server name directive.
| | 02:41 | You can name it anything you want,
but development helps reinforce the idea that
| | 02:44 | this is a development server and not
intended for a production environment.
| | 02:47 | ServerName development.
| | 02:51 | Ctrl+X, and Y, and Enter.
| | 02:56 | PHP does not log errors out of the box.
| | 02:58 | To make the change, you'll need to edit
the PHP configuration. Type sudo nano -w
| | 03:04 | /etc/php5/apache2/php.ini.
| | 03:12 | I'm going to press Ctrl+W to search.
| | 03:14 | I'm going to look for error_reporting =.
| | 03:21 | We're going to change the values for
error_reporting from the production value
| | 03:24 | by pressing Delete and switch it to
the development value, E_ALL | E_STRICT.
| | 03:35 | Next, we're going to search for display_
errors =, and we wish to switch it to On.
| | 03:44 | Next we're going to look for log errors,
log_errors =, verify that it is on.
| | 03:52 | Next, we're going to look for
log_errors_max_length. By default it is 1024.
| | 03:57 | We'll change it to zero, which
has no limit on it whatsoever.
| | 04:01 | Finally, we'll look for error_log =.
| | 04:06 | We'll add a new line here,
error_log =, and we'll log to our share directory, so
| | 04:13 | /media/sf_sandbox/php_errors.log.
| | 04:21 | Hit Ctrl+X to exit, and save.
| | Collapse this transcript |
| Configuring the database server| 00:00 | The configuration is almost complete.
| | 00:02 | The final step is to tell the MySQL
database server where to listen for connections.
| | 00:06 | By default, it only listens to
127.0.0.1, which is the local machine.
| | 00:12 | As you want to be able to access the
database server from the host operating
| | 00:15 | system for easy management and debugging,
you'll allow connections from any IP.
| | 00:20 | Remember, this configuration is for your
local development server, so the only IP
| | 00:23 | that we'll actually be
connecting to it will be your own.
| | 00:26 | Edit the MySQL configuration by
issuing the following command: sudo nano
| | 00:31 | -w /etc/mysql/my.cnf. And we're going
to look for bind-address. Currently
| | 00:41 | it's 127.0.0.1. We're going to change it to
0.0.0.0. Ctrl+X to save, and the database
| | 00:51 | is now configured.
| | Collapse this transcript |
| Installing the Exim email server| 00:00 | Many common transactions send emails,
especially if you're working with a
| | 00:03 | content management system or framework;
| | 00:05 | therefore, you'll need to install a mail server.
| | 00:08 | Exim is an open-source,
lightweight mail transfer agent, or MTA.
| | 00:12 | You don't need to set up a whole mail
server; you just want to be able to send email.
| | 00:15 | Since we're not sending any emails to
the public, you can use any email account
| | 00:20 | that has SMTP support.
| | 00:22 | Gmail accounts support SMTP so
I'll use Gmail as an example.
| | 00:25 | This technique will also work
with Google Apps for domains.
| | 00:28 | First install Exim using apt-get.
sudo apt-get -y install exim4.
| | 00:37 | Next, you'll configure Exim.
| | 00:39 | There are only two changes
that you need to make. sudo
| | 00:42 | dpkg-reconfigure exim4-config.
| | 00:49 | For the general type of mail
configuration, we wish to select mail sent by
| | 00:53 | smarthost received via SMTP or fetchmail.
| | 00:56 | For the System mail name we
can leave ubuntu and over to Ok.
| | 01:01 | For the next step for IP addresses to
listen on for incoming SMTP connections,
| | 01:06 | you can leave it as is.
| | 01:08 | For the other destinations for which
mail is accepted, you can leave it as is.
| | 01:13 | Machines to relay mail for, again, leave it as is.
| | 01:17 | The IP address or host name for the
outgoing smarthost we're going to change to
| | 01:21 | smtp.gmail.com::587.
| | 01:29 | Do we wish to hide the
mail name in outgoing mail?
| | 01:32 | No we do not. And we do not wish to
keep the number of DNS-queries minimal, and
| | 01:37 | the delivery method we can keep as default.
| | 01:39 | We do not wish to split the configuration.
| | 01:43 | The email configuration is almost complete.
| | 01:45 | The last step is to add your email
username and password to the Exim
| | 01:49 | configuration to allow the sending of email.
| | 01:51 | So sudo nano -w /etc/exim4/passwd.client.
And we're going to add the
| | 02:02 | following name and save.
| | 02:04 | *, that means an email, USERNAME,
replace this with your actual username,
| | 02:12 | @gmail.com, followed by PASSWORD,
which will actually be your password.
| | 02:18 | Hit Ctrl+X, Y to save, and now that
we've made all our configuration changes,
| | 02:24 | you'll need to reboot the server.
| | 02:26 | Rebooting isn't necessary for
the web server or database server;
| | 02:29 | you can just reload the
configurations without rebooting.
| | 02:31 | With that said, VirtualBox Guest
Additions does actually require it, so you can
| | 02:36 | give the following command: sudo reboot.
| | Collapse this transcript |
|
|
5. Building a Simple LAMP Web SiteIntroducing phpMyAdmin| 00:00 | Now that both the virtual machine and
server have been configured, let's fully
| | 00:03 | exercise the system to ensure
that everything is working properly.
| | 00:07 | The first thing you'll do is use phpMyAdmin,
which utilizes every component of a LAMP stack.
| | 00:11 | phpMyAdmin is a free and open-source
PHP tool for facilitating MySQL management
| | 00:17 | using a web browser. It's a very
useful tool for debugging database-driven
| | 00:21 | applications, writing
queries, and managing databases.
| | 00:24 | In a production environment, it can be
a liability if not properly secured.
| | 00:29 | As we're only going to be using it
on a local development server,
| | 00:32 | you could be much more
lenient about the security.
| | 00:34 | Install phpMyAdmin using apt-get.
sudo apt-get -y install phpMyAdmin.
| | 00:46 | As part of the installation,
you'll be taken into a wizard.
| | 00:49 | We're going to select Apache2 as the
web server to reconfigure automatically
| | 00:53 | because that's what we have installed.
| | 00:57 | It's going to ask if we wish to
configure the database for phpMyAdmin. Say
| | 01:01 | Yes. The password for the database's
administrative user is root, and we can leave this blank.
| | 01:08 | It will generate a random
password for phpMyAdmin's user.
| | 01:13 | Next you'll configure
phpMyAdmin to automatically log in.
| | 01:16 | This is not something you should
ever do in a production environment,
| | 01:20 | but for local development server, it's safe.
| | 01:23 | We'll edit the phpMyAdmin
configuration, phpmyadmin/config.inc.php.
| | 01:33 | We'll navigate to the line
that reads Authentication type.
| | 01:38 | Currently, it says cookie.
| | 01:39 | We're going to change it to config.
| | 01:42 | That means we're going to
hard code the configuration.
| | 01:44 | We're going to add two more lines: cfg
Servers $i, the user is root, then cfg
| | 01:59 | servers $i password = root. Exit and save.
| | 02:06 | phpMyAdmin can be accessed with your
web browser at the following address
| | 02:11 | http://localhost:8080/phpmyadmin.
You'll see a list of databases on the left.
| | 02:23 | Click phpmyadmin to see the empty
tables that were created as part of the
| | 02:28 | installation process.
| | 02:29 | You'll notice that the left side now
shows the select list followed by table names.
| | 02:33 | You can select a different database
using that select list. Select mysql now.
| | 02:39 | Let's write a raw query to see
how phpMyAdmin formats results.
| | 02:43 | Click the SQL tab and then type the
following: Select * FROM mysql.user.
| | 02:52 | Click Go to execute the query.
| | 02:54 | phpMyAdmin will execute the query and
show you the result in a nice HTML table,
| | 02:59 | complete with controls to edit.
| | 03:01 | Next click the table name db on the left.
| | 03:04 | You'll see the contents of the db
table formatted in a similar matter with
| | 03:08 | different columns and contents.
| | Collapse this transcript |
| Creating a new database and a user| 00:01 | You can use phpMyAdmin to
create your first database and user.
| | 00:04 | Click on localhost and click on the
Privileges tab, then click Add a new User.
| | 00:11 | Under Login Information,
we'll put in user name sandbox.
| | 00:15 | For the Host we'll leave as any host. For
the Password sandbox and Re-type the Password.
| | 00:24 | For the Database for user, we're going
to create a database with the same name
| | 00:27 | and Grant all privileges. Click Create User.
| | 00:30 | You'll see the new user in the User overview.
| | 00:34 | You can use these
credentials in your application.
| | 00:37 | One more change will be needed.
| | 00:39 | We'll need to explicitly add localhost
to the host that the user can log in from.
| | 00:43 | Click on Edit Privileges. Then scroll
down to the Change Login Information.
| | 00:48 | Under Host we'll select Local, and we're
going to keep the old one and just click Go.
| | 00:56 | And we can close the window and
you'll see that sandbox can log in from any
| | 01:00 | host and localhost.
| | 01:02 | Let's create a table in the newly
created database. On the Databases tab, click on
| | 01:09 | sandbox, and let's create a new table
called test. And we are going to have two
| | 01:16 | columns in this test table.
The first column we'll call test ID.
| | 01:22 | This will be AUTO INCREMENTING in a PRIMARY key.
| | 01:26 | We'll add a second column called
content, and we'll make this a Text type.
| | 01:33 | Scroll down and Save.
| | 01:35 | The table has now been created.
| | 01:37 | Click on the table name.
| | 01:39 | You'll see that MySQL returned an empty
result set because there is no content.
| | 01:43 | So let's create some test content now.
| | 01:45 | Click on the Insert tab and in the
first content text area we will type "Hello,
| | 01:50 | lynda.com" and click Go.
| | 01:55 | Now if you go back to the
Browse tab, you'll see our new row.
| | Collapse this transcript |
| Connecting to a local database| 00:00 | In your IDE, your text editor, create a new
file in your Sandbox folder called index.php.
| | 00:09 | This will be our first test script.
| | 00:11 | Remember, this course is about
teaching you how to set up a local development
| | 00:15 | server, not how to program;
| | 00:16 | therefore, this script will be very simple.
| | 00:18 | It will connect to the test database, pull
the content out, and display it to the user.
| | 00:23 | On success, it'll display you an email.
| | 00:25 | If there is a failure, it will
display that failure to you.
| | 00:28 | You can paste the script
for the free exercise files.
| | 00:34 | Next, open up your web browser.
| | 00:36 | If you see the content displayed,
the database connection was successful.
| | 00:40 | If you do not, please refer to
the later troubleshooting chapter.
| | Collapse this transcript |
| Installing WordPress| 00:00 | WordPress is a free and open source
blogging tool and content management system
| | 00:04 | that uses PHP and MySQL.
| | 00:06 | It's currently the most
popular CMS in use on the Internet.
| | 00:10 | Change directory to the shared folder.
| | 00:15 | And to download WordPress,
we're going to use wget.
| | 00:23 | For more information on wget, use the man command.
| | 00:30 | Now, extract the archive.
| | 00:34 | That's all we need to do from the command line.
| | 00:36 | Let's open the browser.
Here in the browser we'll go to
| | 00:40 | sandbox.dev:8080/wordpress/wp-admin/
install.php, and we're going to tell it to
| | 00:52 | create a configuration file.
| | 00:53 | We will click Let's go! The Database Name
| | 00:58 | we'll change to sandbox; User
Name, sandbox; Password, sandbox;
| | 01:05 | the host, its local host; and the Table
Prefix as wp can be kept. Click Submit
| | 01:12 | and then Run the install.
| | 01:13 | For the Site Title I'll type Sandbox.
The Password will be admin, and repeat it
| | 01:23 | again for confirmation.
| | 01:24 | This is a weak password. This is not
something that you should use in a
| | 01:27 | production environment.
| | 01:28 | Add your email and click Install WordPress.
| | 01:36 | WordPress has been installed, click Log
In, admin and admin, Remember Me, and Log In.
| | 01:45 | And WordPress is now been installed.
| | 01:47 | For more information on customizing
WordPress, check out the WordPress courses
| | 01:51 | here in the lynda.com online training library.
| | Collapse this transcript |
| Installing Drupal| 00:00 | Drupal is a free and open source
content management system and content
| | 00:03 | management framework written in PHP.
| | 00:06 | It can be configured to use MySQL
and can be used to build many different
| | 00:09 | kinds of web sites.
| | 00:11 | Change directory to the shared folder.
| | 00:16 | Download the installation archive
using wget. We are using version 7.14.
| | 00:25 | For more information on the
wget command, type man wget.
| | 00:30 | Extract the archive. Open up your web browser.
| | 00:35 | We'll use the standard installation
profile, and English is the language.
| | 00:40 | The Database name, we'll use sandbox; the
Database username, sandbox; and password
| | 00:49 | sandbox. And click Save and Continue.
| | 00:53 | Now we're going to configure the site.
For the site email address, enter your
| | 00:57 | username. For the site maintenance
account we're going to use the username
| | 01:03 | admin, the email address user@example.com,
password admin, and we'll confirm the password, admin.
| | 01:13 | Default country, we use United States.
Default time zone was detected correctly.
| | 01:19 | And we will hit Save and Continue.
| | 01:23 | Drupal is now installed.
| | 01:24 | We'll visit the newly installed site.
| | 01:26 | Part of the Drupal installation will
be to log you in as the administrator.
| | 01:30 | For more information on customizing
Drupal, check out the Drupal courses here in
| | 01:34 | the lynda.com online training library.
| | Collapse this transcript |
| Installing Symfony| 00:00 | Symfony is an MVC web application framework
written in PHP, released under the MIT license.
| | 00:06 | It can be used as a foundation to
build anything from small programs to
| | 00:09 | enterprise-grade applications.
| | 00:11 | Change directory to the shared folder.
cd /media/sf_sandbox. Download Symfony.
| | 00:19 | We will use the wget command, Wget, space,
| | 00:22 | http://symfony.com/download?v=Symfony_
Standard_Vendors_2.0.13.zip -O, for output,
| | 00:42 | and then the file name, symfony.zip.
| | 00:45 | If you are interested in learning more
about wget, type man wget. Extract to the
| | 00:51 | archive, unzip symfony.zip.
| | 00:54 | We are going to need to make some PHP
configuration changes for Symfony.
| | 00:58 | First we'll disable short open tags.
| | 01:00 | We will need to edit the PHP
configuration, which is a core configuration file, so
| | 01:04 | administrator privileges are needed.
| | 01:07 | Type sudo nano -w /etc/php5/apache2/php.ini.
| | 01:16 | We are going to press
Ctrl+W to search within the file.
| | 01:20 | We'll search for short_open_tag =.
| | 01:26 | You see the default value is On.
| | 01:28 | We wish to change it to Off.
| | 01:30 | While you are in there, you will need
to set the time zone with something from
| | 01:33 | the list of PHP's supported
time zones. Look for date.timezone.
| | 01:38 | We will use America/Los_Angeles.
| | 01:43 | I am going to save and exit.
| | 01:46 | Next, we will need to install some
software dependencies. sudo apt-get -y to say
| | 01:52 | yes to any prompt, install
php5-sqlite php5-intl php-apc.
| | 02:04 | Ensure that the new configuration is
loaded in Apache by restarting it. Type
| | 02:08 | sudo service apache2 restart.
| | 02:13 | If you were to execute nano now,
you would see an error message about access
| | 02:17 | denied to the nano history.
| | 02:18 | This happens because the root user
executed nano and the history was written
| | 02:21 | with root user privileges.
| | 02:23 | To prevent this from happening,
we are going to execute two commands.
| | 02:27 | The first command will change the file
permission to allow anyone in the group
| | 02:30 | to write to the file and anyone to read it.
| | 02:32 | I am going to sudo chmod 755 ~ /.nano_history.
| | 02:40 | The second command will change the
ownership of the file back to your user. sudo
| | 02:44 | chown jpeck:jpeck, replace that
with your username, ~/.nano_history.
| | 02:55 | Finally, you will need to
make some configuration changes.
| | 02:57 | By default, the configuration script
will only allow access from the local host.
| | 03:02 | As we are connecting from the guest
operating system, you will need to comment
| | 03:05 | out those lines to be able to continue.
Type nano -w Symfony/web/config.php.
| | 03:14 | We'll look for the header and
exit lines and comment them out.
| | 03:18 | Hit Ctrl+X, Y to save,
Enter, and that file is complete.
| | 03:24 | We are going to have to do the same to
the Symfony web app dev file, so nano -w
| | 03:31 | Symfony/web/app_dev.php.
| | 03:37 | Look for the header and exit
lines and comment them out.
| | 03:40 | Ctrl+X, Y, Enter, and the file is now saved.
| | 03:45 | From your web browser, click on
Configure your Symfony Application online.
| | 03:54 | The Driver is set correctly.
| | 03:55 | We are going to want to change the
Name to sandbox, the User to sandbox, the
| | 04:01 | Password to sandbox, and the Password
again to sandbox, and click Next Step.
| | 04:09 | The Global Secret key is fine.
| | 04:11 | It's already been generated. Click Next
Step and the distribution is now Configured.
| | 04:16 | Go to the Welcome page and run the demo.
Hello World works, which verifies the
| | 04:24 | Symfony configuration.
| | Collapse this transcript |
| Installing Zend Framework| 00:00 | Zend Framework is an open
source, object-oriented PHP5 web
| | 00:04 | application framework.
| | 00:05 | It can be used to rapidly develop
applications, leveraging built-in cogeneration
| | 00:09 | utilities and a flexible architecture.
| | 00:12 | To install, change the directory to the
shared folder. Sownload Zend Framework.
| | 00:18 | We will use wget.
| | 00:20 | http://framework.zend.com/releasses/
ZendFramework-1.11.11/ZendFramework-1.11.11-minimal.zip.
| | 00:44 | For more information on the
wget command, type man wget.
| | 00:48 | Next, unzip the archive.
| | 00:52 | In a production environment, you'd want to put
the Zend Framework library out of the web root.
| | 00:57 | For local development,
it's helpful to have access to the library.
| | 01:00 | Optionally, PHP unit can
be installed at this time.
| | 01:03 | PHP unit is a unit testing framework
for writing automated PHP tests and
| | 01:07 | analyzing the results.
| | 01:09 | Zend Framework leverages that library
and can generate test skeletons as part
| | 01:13 | of project creation.
| | 01:14 | To install PHP unit, you will use the
PHP Extension and Application Repository
| | 01:19 | installer, which is specific to PHP libraries.
| | 01:22 | You will need to install
the PEAR application first.
| | 01:24 | Fortunately, apt supports it.
sudo apt-get install php-pear.
| | 01:31 | Next, allow PEAR to find and install
any dependencies that it needs. sudo pear
| | 01:36 | config-set auto_discover 1.
| | 01:41 | Then update the list of
available software. sudo pear
| | 01:45 | channel-discover pear.phpunit.de.
| | 01:50 | Finally, use PEAR to install
PHP unit. sudo pear install
| | 01:56 | pear.phpunit.de/PHPUnit.
| | 02:02 | Next, use the ZF command
line's tool to create the project.
| | 02:06 | You use the command to create project and
specify the relative path to the sandbox.
| | 02:10 | The project will then be created.
ZendFramework-1.11.11-minimal/bin/zf.sh
| | 02:17 | create project zf-sandbox.
| | 02:22 | You need to install the Zend Framework
library in the newly created project.
| | 02:25 | Unfortunately, you cannot create a
symbolic link to the Zend Framework library
| | 02:29 | due to a limitation of VirtualBox.
| | 02:31 | Instead, you can make a
recursive copy of the Zend library, cp -R
| | 02:36 | /media/sf_sandbox/ZendFramework-1.11.11-
minimal/library/Zend, and we are going to
| | 02:46 | copy it to zf-sandbox/library.
| | 02:51 | This completes the installation.
| | 02:53 | You can now open your web browser. Fo to
| | 02:55 | http://sandbox.dev:8080/zf-sandbox/public/.
| | Collapse this transcript |
| Installing CakePHP| 00:00 | CakePHP is an open-source web
application framework that is loosely modeled on
| | 00:04 | Ruby on Rails, complete with
code scaffolding and generation.
| | 00:08 | It can be extremely
useful for rapid prototyping.
| | 00:11 | To install CakePHP,
change directory to the shared folder.
| | 00:17 | Next, download CakePHP.
| | 00:19 | We will use the wget command, wget
| | 00:21 | https://github.com/cakephp/cakephp/
zipball/2.1.2. We will use the -O to specify
| | 00:38 | output to a particular file name.
| | 00:40 | We will use cakephp.zip.
| | 00:44 | For more information on the
wget command, type man wget.
| | 00:49 | Unzip the archive. Unzip cakephp.zip.
| | 00:54 | Change to the directory.
| | 00:55 | You can use tab completions so you don't
have to type out the entire directory name.
| | 01:00 | Copy the default database
configuration to database.php, cp
| | 01:04 | app/Config/database.php.
default to app/Config/database.php.
| | 01:15 | Next, we will edit the
database configuration file.
| | 01:20 | Config. We are going to
look for public $default.
| | 01:27 | We are going to change the login to
sandbox, the password to sandbox, and the
| | 01:39 | database to sandbox.
| | 01:44 | Press Ctrl+X to save and exit.
| | 01:47 | Next, make the security customizations
to the application configuration. nano -w
| | 01:52 | app/Config/core.php.
| | 01:58 | You need to change both the
Security.salt and the Security.cipherSeed.
| | 02:03 | The salt can be a combination of letters and
numbers, while the cipherSeed is digits only.
| | 02:07 | You can make these anything
you want, the longer the better.
| | 02:13 | As this is a development environment,
you can just use sandbox for the salt,
| | 02:17 | 12345 for the cipherSeed, which
is the same password as my luggage.
| | 02:23 | When you're complete, save and exit.
| | 02:26 | Finally, you can open the
application root in your web browser.
| | 02:31 | CakePHP is now successfully installed.
| | Collapse this transcript |
|
|
6. TroubleshootingTroubleshooting Apache| 00:00 | There are a number of ways that you
can troubleshoot the Apache web server.
| | 00:04 | For this demonstration, I am going to
start off by intentionally disabling the
| | 00:07 | web server using the following
command, sudo service apache2 stop.
| | 00:14 | When you attempt to access the
sandbox with your web browser at
| | 00:17 | http://sandbox.dev:8080/,
you will not see anything.
| | 00:27 | Start the web server again.
sudo service apache2 start. Reload the page.
| | 00:36 | You should see the same
demonstration content from earlier.
| | 00:39 | Next, try to access localhost at
the same port: http://localhost:8080.
| | 00:48 | You should see, It works!
| | 00:50 | If you do, then your web server is running.
| | 00:52 | If you don't see the test content that
we created, but you can see the It works!
| | 00:56 | page, the configuration is wrong.
| | 00:59 | Take a look at the log files for Apache.
| | 01:01 | From the command line,
change directory. cd /var/log/apache2.
| | 01:10 | Display all the files in the
directory, then start the sandbox.
| | 01:13 | We are going to specify the name
sandbox.*, which will match any file that begins
| | 01:18 | with sandbox. ls -la sandbox.*.
| | 01:24 | You will see several logs.
Of interest, sandbox.dev-access.log and
| | 01:29 | sandbox.dev-error.log.
| | 01:32 | You can tail -f any of these logs to
watch them in real time. Tor page views,
| | 01:37 | tail -f sandbox.dev-access.log.
| | 01:43 | Now if we open up the web browser and go
to sandbox.dev:8080, you will see, a new
| | 01:51 | line has been added to the log.
| | 01:53 | For Apache errors, we are going to
tail -f sandbox.dev-error.log. And we are
| | 02:03 | going to enter in an invalid URL.
And again, we will see that an additional line
| | 02:09 | has been added to the log.
| | 02:11 | If you aren't sure that Apache is
running, you can execute the following
| | 02:15 | command: ps aux, which reports a
snapshot of the current processes, pipe it to
| | 02:21 | grep, grep apache, which matches text.
| | 02:26 | You should see a number of Apache processes.
| | 02:28 | If you don't, Apache isn't running.
| | 02:31 | If there are configuration errors,
they will be displayed when you attempt to
| | 02:34 | restart the web server.
Type sudo service apache2 restart.
| | 02:41 | If Apache is running, make sure
that it's listening for connections.
| | 02:45 | We are going to use the netstat
command. Type sudo netstat -nap and pipe
| | 02:53 | again to grep apache.
| | 02:57 | You should see that Apache is
listening on any IP on port 80.
| | 03:01 | If it isn't, then you can check
to see if something is conflicting.
| | 03:04 | Type sudo netstat -nap and pipe it to grep :80.
| | 03:13 | If you see multiple lines then you
can identify what the other process is
| | 03:16 | listening on port 80, by
looking in the right column.
| | 03:20 | If you want any more information about
the commands used in this part, use the
| | 03:24 | man command to read their manuals.
| | Collapse this transcript |
| Troubleshooting MySQL| 00:00 | By default, MySQL does not
log transactions or problems.
| | 00:04 | To enable logging, a
configuration change is needed. Type sudo nano
| | 00:10 | -w /etc/mysql/my.cnf.
| | 00:14 | We are going to search for, in brackets, mysqld.
| | 00:19 | Beneath that, add the following lines:
log-error=/var/log/mysql/mysql-error.log.
| | 00:32 | The next line for general logging
will log every query that is made.
| | 00:36 | This can potentially slow down the
system and will get extremely large,
| | 00:39 | so only do this if you need to.
log=/var/log/mysql/mysql.log.
| | 00:48 | Next, we are going to log slow queries.
| | 00:50 | This is very useful when
looking for performance bottlenecks.
| | 00:53 | First, we will specify the threshold for
long query duration, long_query_time=1.
| | 01:01 | Next, log-slow-queries=/var/
log/mysql/slow-queries.log.
| | 01:13 | You can optionally log
queries that do not have indexes.
| | 01:16 | This has the potential to log a large
number of queries, so only do this if
| | 01:20 | you are looking to do a lot of optimizing.
log-queries-not-using-indexes. Save and exit.
| | 01:29 | Now restart MySQL. sudo service mysql restart.
| | 01:37 | Take a look at the general MySQL log
and open a phpMyAdmin window. tail -f
| | 01:42 | /var/log/mysql/mysql.log.
http://localhost:8080/phpmyadmin.
| | 01:57 | As you can see, every query
is logged in a verbose format.
| | 02:01 | If you're having database errors,
take a look at the MySQL error log, tail -f
| | 02:06 | /var/log/mysql/mysql-error.log.
| | 02:15 | If you're not sure that MySQL is
currently running, execute ps aux | grep mysql.
| | 02:24 | If the service isn't running,
try restarting it. sudo service mysql restart.
| | 02:32 | Next, try connecting to MySQL from
the command line. mysql -u for the
| | 02:38 | username, which in this case is root, followed
by a space, -p for password, which is also root.
| | 02:47 | You should get a mysql command line.
| | 02:49 | You can leave by typing exit.
| | 02:51 | If you attempt to connect to a server
that isn't running, you'll get a verbose
| | 02:55 | error message. mysql asdf.
| | 02:58 | If mysql is running but you can't
connect to it, see if it's listening to port
| | 03:02 | 3306. sudo netstat -nap | grep mysql.
| | 03:10 | If you want any more information about
the commands used in this part, use the
| | 03:13 | man command to read their manuals.
| | Collapse this transcript |
| Troubleshooting PHP| 00:00 | Often, most problems are not with
PHP itself but with a web server.
| | 00:04 | With that said, there are a number of
steps that you can take to gain more
| | 00:07 | introspection into your PHP configuration.
| | 00:10 | You can check the version of PHP installed
from the command line. Type php --version.
| | 00:16 | Additionally, you can use the php
--info command to see configuration details
| | 00:22 | for your version of PHP.
| | 00:24 | There are two distinct configurations:
one for the version that Apache uses and
| | 00:28 | one for the command line.
| | 00:30 | If you wish to see the PHP
configuration for the web server, use the phpinfo
| | 00:34 | function call. Open up the test
script, add phpinfo, followed by exit.
| | 00:43 | Open your browser and
navigate to http://sandbox.dev:8080.
| | 00:49 | This is the web server's PHP configuration.
| | 00:52 | Go back to your script, remove the
phpinfo function call, and replace it with an
| | 00:58 | artificially introduced error. Save the
file, then open up the web browser, and
| | 01:03 | reload the page. The error
will be displayed to you.
| | 01:07 | When you configure PHP, you set up the
error log to log only PHP errors to the
| | 01:11 | shared folder so any errors
will be written to that file.
| | 01:14 | Open up the terminal and watch the file
from the command line, by typing tail -f
| | 01:18 | /media/sf_sandbox/php_
errors.log. Reload the page.
| | 01:27 | You'll see the new error appear in the log.
| | 01:31 | This can be useful for postmortems, or
if you get the infamous white page of
| | 01:34 | death, which is usually a PHP fatal error.
| | Collapse this transcript |
| Troubleshooting Exim| 00:00 | In this configuration, exim should
be stable and not prone to errors.
| | 00:04 | However, there are times when you want
to see if there are any problems with the
| | 00:07 | configuration or the server.
| | 00:09 | First, check to see if the exim
process exists. Type ps aux | grep exim.
| | 00:17 | If it is not running, try restarting the
process. Type sudo service exim4 restart.
| | 00:25 | If it is running, check to see if exim4
is listening for connections. Type sudo
| | 00:30 | netstat -nap | grep exim.
| | 00:36 | You should see exim on port 25.
| | 00:39 | The exim log files are
located in /var/log/exim4.
| | 00:42 | You can watch the main log file by
using the following command: sudo tail -f
| | 00:47 | /var/log/exim4/mainlog.
| | 00:53 | If you send an email and you see that
it's been sent in a log, but you are not
| | 00:57 | receiving it, check your spam folder.
Depending on the content or frequency of
| | 01:00 | the email, it may have been filtered out.
| | 01:02 | Let's send a test email now.
| | 01:04 | Open up your web browser and
navigate to http://sandbox.dev:8080.
| | 01:10 | If you look at the exim log, you will
see that an attempt to send an email to
| | 01:16 | user@example.com has been made.
| | Collapse this transcript |
|
|
7. Enhancing the Web ServerInstalling Webmin to monitor your server| 00:00 | The following segments contain
instruction on how to set up optional enhancements
| | 00:04 | for your development server.
| | 00:05 | They include web-based system
administration, logging in without a password, and
| | 00:09 | remote database interaction
with a graphical user interface.
| | 00:12 | Webmin is a web-based system
administration interface which will allow you to
| | 00:16 | manage Apache, file sharing,
user accounts, and more.
| | 00:20 | It's extremely powerful and easy to
use, but at the same time it can be
| | 00:23 | considered a security liability.
| | 00:25 | You should never use Webmin in a
production context, as it allows root logins
| | 00:29 | through a web browser.
| | 00:31 | There are few software
requirements that need to be met.
| | 00:34 | You can use apt-get to install them.
| | 00:36 | Type sudo apt-get install -y perl libnet
-ssleay-perl openssl libauthen-pam-perl
| | 00:50 | libpam-runtime libio-pty-perl
apt-show-versions, and python.
| | 01:03 | Next download the Webmin
package using the wget command. wget
| | 01:07 | http://prdownloads.sourceforge.
net/webadmin/webmin_1.580_all.deb.
| | 01:23 | For more details on wget, type man wget.
| | 01:27 | Next, install the Webmin package.
sudo dpkg --install webmin, and press Enter.
| | 01:37 | A small configuration change is
needed. By default webmin uses SSL.
| | 01:41 | However, as the certificate provided
by Webmin is self-signed, some browsers
| | 01:46 | will not accept it.
| | 01:47 | As a workaround, you can connect over an
unencrypted connection. Type sudo nano
| | 01:52 | Space -w /etc/webmin/miniserve.conf.
| | 02:00 | We're going to look for SSL and
change it from 1 to 0. Save and exit.
| | 02:06 | You'll have to restart Webmin for the
configuration change to take effect. sudo
| | 02:11 | /etc/init.d/webmin restart.
| | 02:16 | Webmin runs on a nonstandard port.
| | 02:18 | You'll have to forward the
port to be able to access it.
| | 02:21 | Open up VirtualBox, select Sandbox
and go to Settings. Go to Network > Port
| | 02:28 | Forwarding, and we'll add a new rule.
| | 02:30 | Click Insert a new rule, Webmin,
Host Port, 10,000, and same for the Guest
| | 02:39 | Port, 10,000. Click OK.
| | 02:43 | That's known bug. Click OK and OK.
| | 02:47 | Open up your browser and
navigate to http://local host:10,000.
| | 02:56 | It'll ask you for your username and
password. Enter them now. Check Remember
| | 03:02 | login permanently if you'd like and log in.
| | 03:05 | Feel free to explore.
For additional documentation see webmin.com.
| | Collapse this transcript |
| Using SSH without a password on Windows| 00:00 | Instead of using a password, you can use
the key file to log directly into your system.
| | 00:05 | For Windows you can use free
utilities to facilitate this process.
| | 00:08 | Download puttygen.exe from
the PuTTY homepage. Then run it.
| | 00:14 | In the Parameters section, choose SSH-2
DSA. Then click Generate to create a
| | 00:20 | public-private key pair.
| | 00:22 | Generate some entropy by
moving your mouse back and forth.
| | 00:25 | If you wish to enter a pass phrase, do so now.
| | 00:28 | Click Save public key, public_key, and
click Save private key. Are you sure?
| | 00:35 | Yes, private_key. Then copy the
content of the public key, load up PuTTy, and
| | 00:45 | connect to the Sandbox.
| | 00:47 | Type your password, now create the
SSH directory, mkdir Space -p .ssh.
| | 00:56 | Next, edit the contents of the authorized
keys file. nano -w .ssh/authorized_keys.
| | 01:06 | Paste the contents of the file
Ctrl+X, Y to save, and enter, and log out.
| | 01:13 | Download and run pageant. By default it
runs in the system tray. Right-click on
| | 01:18 | it and go to Add Key. Select your
private key. It makes the key available to any
| | 01:24 | other PuTTY process. Double-click
putty and let's go to the Sandbox again.
| | 01:30 | And you see that it does not
ask for a password anymore.
| | 01:33 | Now when you run PuTTY you'll be
able to log directly into your system.
| | Collapse this transcript |
| Using SSH without a password on Mac| 00:00 | Instead of using a password, you can use the
key file to log directly into your system.
| | 00:05 | For Mac OS this is a
fairly straightforward process.
| | 00:08 | From the local terminal--not within your
development server--type the following.
| | 00:13 | Type ssh-keygen -t rsa -C, and then
in quotation marks your email address.
| | 00:24 | It'll ask you to enter a file. Use the default.
| | 00:32 | The next section about a pass phrase
begs a bigger question: Are you going to be
| | 00:36 | using key to authentication for any
server other than your local development
| | 00:39 | server? If no, then you can
leave the passphrase blank.
| | 00:43 | Next, you'll want to copy the public
key to your development server. ssh -p2222,
| | 00:51 | then your username @sandbox.dev,
then the command mkdir -p.ssh.
| | 01:02 | It'll ask you for your password.
| | 01:05 | Now we're going to copy the contents
of your public key to the development
| | 01:09 | server, cat ~/.ssh/id_rsa.pub.
We're going to pipe it to SSH, ssh -p2222. For the
| | 01:23 | port, your username @sandbox.dev.
Then in single quotes 'cat
| | 01:29 | >>.ssh/authorized_keys' end quote.
| | 01:38 | It will ask me for my password again.
| | 01:41 | You can now log directly into your
server, ssh -p2222 jpeck@sandbox.dev.
| | 01:51 | If you're tired, like me, of specifying the
port from the command line there is a better way.
| | 01:55 | We can create configuration for
SSH. Type nano -w ~/.ssh/config.
| | 02:05 | I'm going to create a new host, Host
sandbox, two spaces, HostName sandbox.dev
| | 02:12 | space, space, Port 2222, User and
then your username. Save and exit.
| | 02:21 | You can now just type ssh sandbox.
| | Collapse this transcript |
| Using a MySQL client with your database| 00:00 | One of the ports that you forwarded during
the VirtualBox configuration was for MySQL.
| | 00:05 | If you use a MySQL client, you can
connect to your virtual development server
| | 00:08 | using that forwarded port.
| | 00:10 | As a demonstration,
I've selected Sequel Pro from sequelpro.com.
| | 00:14 | It's a free MySQL
database management tool for Macintoshes.
| | 00:17 | For Windows, the free MySQL and
Microsoft SQL client HeidiSQL, from heidisql.com,
| | 00:25 | will allow you to manage your database.
| | 00:27 | In particular, the information that
you need to connect to your database
| | 00:30 | remotely is, for the Host, sandbox.dev; for
the Username, sandbox; and the Password, sandbox.
| | 00:38 | For the Port, we'll use the
forwarded port, 9306, and click Connect.
| | 00:46 | You can select a database and see the contents.
| | 00:51 | I find it convenient to use a database
client for importing and exporting data
| | 00:54 | rather than using the command line.
| | Collapse this transcript |
|
|
ConclusionManaging the server| 00:00 | As your local development server is
virtualized, it's running like a program.
| | 00:04 | As such, it's not going to
automatically start or shut itself down.
| | 00:08 | There's a couple of
different ways you can do that.
| | 00:10 | You can shut down the server using SSH.
| | 00:12 | This is the preferred manner, as it
ensures that everything shuts down properly,
| | 00:15 | especially the database.
| | 00:17 | Type the following command: sudo shutdown -h now.
| | 00:22 | It'll ask for the password.
| | 00:25 | This will shut down the server gracefully.
| | 00:27 | Now you can restart it from the
VirtualBox Manager by double-clicking on the
| | 00:30 | name. And you can log back in.
| | 00:36 | If you needed to reboot in order to
allow for a program installation or resolve
| | 00:40 | an issue, you can use the
reboot command. sudo reboot.
| | 00:44 | It will ask for the password and
the machine will gracefully reboot.
| | 00:51 | You can also suspend the VM,
which is a very nice feature.
| | 00:54 | It saves the state, allowing you to
resume from exactly from where you left off.
| | 00:58 | This can be shorter than doing a
full boot, and you can also revert to
| | 01:01 | a particular state.
| | 01:02 | To suspend a VM, open the VirtualBox window
containing the VM and click the Close button.
| | 01:09 | You'll be prompted for an action.
Choose Save the machine state. The VM will be
| | 01:13 | listed as saved, in the list of boxes,
and you can resume by double-clicking.
| | 01:19 | How do you maintain the server?
| | 01:21 | When you log in, sometimes you'll be
prompted if new packages are available.
| | 01:25 | Once a week, run the following
commands: sudo apt-get update.
| | 01:30 | It'll ask for the password, and what it
will do is check to see what the latest
| | 01:34 | versions of the packages
that you have installed are.
| | 01:37 | To upgrade the packages,
type sudo apt-get upgrade.
| | 01:42 | That will ensure that you have the
latest stable versions of the server
| | 01:45 | software installed.
| | 01:46 | As we are already up to date,
nothing needs to be upgraded.
| | 01:50 | What about server security?
| | 01:51 | As you forwarded ports, when the
server is running, its services will be
| | 01:55 | exposed to the outside world unless you have a
Firewall in place to prevent those connections.
| | 01:59 | Alternatively, if you're behind a
router that does not forward ports, then your
| | 02:03 | development server cannot
be accessed from the outside.
| | 02:06 | Finally, a best practice is to turn off
the virtual server when you are not using it.
| | 02:10 | This way your host machine will
consume less resources, and there will no
| | 02:14 | chance of compromise.
| | Collapse this transcript |
| Where to go from here| 00:00 | We've come a long way.
| | 00:01 | I've shown you how to configure a
virtual machine, install and configure a
| | 00:05 | fully functioning Linux web
application server, demonstrated the basics of
| | 00:09 | database administration, and
installed the common CMS, CMF, and framework.
| | 00:14 | While some of the configurations are
intentionally insecure, many of these
| | 00:18 | techniques can be scaled up, and, with a
layer of security added, be ready for
| | 00:22 | usage in a public facing context.
| | 00:24 | You can use many of these base skills to
manage your own virtual private server, or VPS.
| | 00:29 | Alternatively, you can stop right here.
| | 00:31 | You've got a fully functioning local
development server optimized for your needs.
| | 00:35 | You can work from any coffee shop or
cabin in the woods that you want to,
| | 00:39 | untethered by the need of an
Internet connection or external hardware.
| | 00:42 | Whatever the case may be,
thank you for watching.
| | Collapse this transcript |
|
|