02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Installing PHP

At this stage all that is left is for us to configure PHP. The process is very similar to the way we install mySQL. We will use yum to install php.

Video Transcript

00:00We are getting really close to the process of setting up our server.
00:06We already have our, in our lamp world, we have our L-A-M and all that's left is our
00:11P which is the PHP part. Now the PHP part is easiest. Let me just clear the screen so we'll
00:16have a nice clean screen here. Really all I'm going to do is I'm going to install PHP.
00:21So I'm going to call the yum command and I'm going to install PHP. Now before I continue
00:26and I install PHP, I actually want to install two things. I want to install the PHP package
00:30and notice it's a package, it's not a server. So we're not going to need to start it and stop
00:36it because as soon as you have PHP installed, that's it. You have PHP and it's going to run
00:40with your server. It's going to run with your HTTP server. The next step that we want is we
00:45want to also add a communicator between PHP and MySQL. To do that, I'm going to also add the
00:51package PHP MySQL and notice what I've done. I just put here a space so I could install two
00:58packages at the same time. All that's left for me to do is click on enter and put in my password
01:04for my demo account and it's going to go through that process and it's going to find what it needs
01:09to install and notice that it needs to install a few other packages as well. Now one more thing
01:16that I want to talk about before we continue is I want you to make sure also that you're aware that
01:22every package that goes with PHP usually well 99.9% and this time starts with PHP dash with
01:29whatever it does. So for example, PHP common or PHP PDO or PHP CLI, this is the name of the package
01:38the CLI and it belongs it's a it works in PHP. So it's really just a naming convention and you
01:44could find many other packages but you don't I recommend that you don't install anything
01:49unless you see that you need it. So if you're going to work with some sort of PHP extension
01:54or I don't know what and it's going to you're going to see that there's a requirement of a certain
01:58package then and only then you want to install and the reason is you don't want to bloat your server
02:03the less things running the better. So the less things that we put on our server the lighter and
02:07less heavy our server will be. So with that said I'm going to type why because I do agree to
02:13these terms I want to I do want to install all those five packages because I want to have PHP
02:18installed on my server. So I'm going to go ahead I'm going to click on yes. And again as always
02:22it's going to go through that process of downloading and installing and we talked about that space. So
02:28if in the future you want to install more than one thing with your yum command you could always
02:32put a space and add another application that you want to install. Now we don't need to restart
02:38our server and the reason is is because our server will automatically have that our PHP because
02:43we're not installing we're not adding a server we're not changing anything in configurations of
02:50MySQL or HTTP we're adding a package we're adding a capability access to a specific capability
02:57on our server. So the next step that I want to do is in the next video we're going to test out
03:02and see that PHP really is working and we're going to go back to our site that we had
03:06and we're going to go back to our site and we're going to add a PHP page to make sure
03:11that it actually works. So we'll see you in the next lesson when we do that.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!