How to install Apache, MySql and PHP on Windows 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up guys Alex here thank you for checking this video and welcome to this brand new series called good gear these new series I'm going to do mostly tutorials but not only about what development but all the wide aspect of developers in technology and all the things that can help you to improve your life as a web developer so in this first episode I'm gonna tackle a pretty annoying issue that a lot of you you sir have and a lot of you wrote on the comment section below the issue is how to set up a local environment on a Windows machine Windows is not the most friendly of the operating system when it comes to create a local environment when it comes to install Apache my sequel and PHP and when it comes to actually code and do something with the machine itself so let's take a look on how to do it so first of all we have to download Apache and to download Apache we have to go to the actual website of Apache ladies Apache lounge dot-com slash download and let's a load the latest version of Apache that currently is the 2.4 point 18 you can download the 60 bit for version or the 32 bit if your system is in 64 32 to check what kind of system do you have you can right click on the windows icon on the windows menu icon you can click on system in this panel you can check if your system type is a 60 bit version operating system or a 32-bit - it's 64 so I'm going to download the 64 bit version the file zip after its downloaded we can access our download folder we can find here does it let's double click it to extract ik and inside here you will find an Apache 24 folder what we have to do we have to access our PC and our C driver and copy/paste the Apache 24 to the base root of our C Drive after transferring the entire folder we have to load another important framework in order to use Apache and this framework is microsoft visual c++ let's download the latest version this currently is the 2013 scroll down here select language English and click download we want the load of course also in this case the version corresponding to your operating system in my case is the x64 because it's the 64-bit version if you have a 32-bit operating system download the x86 version select here and click Next after the download access again your download folder and double-click on the application that you just downloaded after the installation we have to download another package file that is actually PHP that is what we want to install so let's go back on our search engine and type the URL windows dot PHP dotnet slash download PHP 7 is the current new release of PHP but I strongly suggest you to download the PHP 5.6 it's more common and it's commonly installed in all the servers and current hosting providers there are out there so you will be able to use a PHP 7 in the future of course but for now because we want to code something that is going to be comfortable we pretty much everywhere suggest you to stick with the version 5 I'm going to go with a 64-bit version and download the zip file also in this case after downloading access the download folder open the zip file and create a folder inside your C Drive called PHP new folder PHP access these newly generated folder inside here let's extract all the files inside our recently downloaded zip file after copying all the file let's go back in our C folder and let's access the Apache 22:24 folder that we previously moved from the zip file let's access the folder come and let's edit these httpd.conf file we can simply open it with a notepad is going to be more than enough to edit this file let's scroll down to the bottom of this file that it's quite long and let's add the current lines load capital M module PHP 5 underscore module space double quote C column slash PHP two point recently generated folder PHP 5 Apache to underscore 4 dot dll on another line let's add handler application /x - httpd / - PHP space dot PHP let's put a comment with a hashtag symbol to configure the path the path to PHP dot ini' configuration file of PHP and my PHP na oh my dear it's going to be equal to capital C column forward slash PHP be careful when you're writing this code because all any single error mistake any single type could completely destroy and make your Apache server not usable so be careful for any typos so hp-5 underscore module has to be one single word load module PHP file let's check back if you brought everything correctly yeah looks good let's save this file let's search inside this file for the text directory index and let's replace the index dot HTML to index dot PHP so we're going to say to you Apache that our first file we want it to be a PHP file and not an HTML file while we access our localhost to test let's save it now let's search for server name and as you notice here the server name variable it's commented so we have to uncomment the variable and let's change it DZ is going to be the fake URL de we're going to type in our browser to access the server name we don't want to use example.com but we want to use just a simple localhost and save the file now we have to launch the common line tool by typing in the search bar of cortana CMD we're gonna have a list of results and the first one is the run command instead of hitting Enter we want to hit control shift and enter and we're going to prompt with the usual really annoying prompt command that has as if we want to launch the common tool as an administrator we have to hit yes in order to install some specific software we need to run this as an administrator now we have to write these following script C column backward slash Apache 24 to access our folder backward slash bin backward slash HTTP space - k space install and hit hunter sorry that's a typo a column not if the installation doesn't run properly and you get prompt with an error of a missing dll I suggest you to download the 2015 version of Visual Studio C++ from the Microsoft website this should solve any issues so now we have to configure a bunch of environment and variable to do that we have to right click on the windows button let's click on system let's click on advanced system settings and inside the Advanced tab down below here there's a button called environmental variables let's click on head and inside the system variables let's scroll down a lesser for the path system variable let's double click here to head it and let's add a bunch of variable so the first one we have to add C column backward slash Apache 24 let's write capital C should work is e also a lower case but better always put capital to avoid any problem and the other one is C column backward slash Apache 24 backward slash bin and let's add also capital C column backward slash PHP and just to be sure let's put PHP B for Apache 24 and Apache 24 bin let's click OK ok and close this section now we can check if Apache settings are ok and we can check if all the server's was set it up properly so we can type see column backward slash Apache Apache 24 backward slash bin back row slash HTTP dee space - capital S and hit enter now we see has a results we have a virtual host configuration with our settings and we have a bunch of settings define with all our costs the option from our Apache 24 folders so we have the confirmation that our server is running and it's working now we have to edit a little bit some PHP settings - in order to tell Apache which PHP settings we want to add let's access our folder structure let's go in our PC folder C Drive our PHP folder and let's scroll down and let's search for a file called PHP dot ini' - development we can rename this file by removing development and the - so it's going to be PHP dot ini' we're going to prompt with a rename confirmation let's click yes let's open this file and we have to uncomment a bunch of sections so first let's search for extension - dear and we have to uncomment the extension dear equal x so we can uncomment it by removing the semicolon at the beginning the other thing we have to uncomment we have to comment the my sequel models so let's search again for PHP underscore my sequel dot DLL and here we can uncomment this extension and we can uncomment d my sequel i ll that is another extension of my sequel that most likely we're going to use with PHP save the changes let's go back in our comment line and let's go back in the root folder by typing CD and double dot to go back one folder and when we are in our C route let's type CD PHP to access the PHP folder and now here we can type PHP - M to see all the list of modules there are B are being loaded so everything is working properly for now after we did all of these I suggest you to restart your machine and be sure that apache automatically starts at the beginning and everything set it up properly after this you can open the your browser and type in a URL bar local host we have the confirmation that our server is working because it's loading the localhost and is showing all the files that we have in the index of our localhost but where this folder is so to access this folder we can open our a folder inspector inside epc folder see where the operating system is apache 24 htdocs anyway we can find the index dot HTML file so this is the folder the directory where apache is accessing while we type local O's in the URL just to check if PHP it's working it's properly configure let's create a new file right click new let's create a text document we're going to replace this and let's call a info dot PHP we're gonna ask if we want to rename the file extension let's click yes let's open this file with your code editor your IDE or even with the notepad it's fine we don't need to do anything crazy here and let's open the PHP tags and let's write inside PHP info brackets and semicolon at the end save this file close it let's refresh this page let's click on info dot PHP and because we use that code from PHP to print all the information we're going to have these nice table weed all the information of our PHP version so we download a version five point six point sixteen and here we have the list of all the modules that we activated all the options that we can use and all the information of our localhost and if our PHP section is actually working now we have to download and install my sequel in our machine so let's search for my sequel going to the download section let's scroll down until the GPL the open source edition the Community Edition and let's click on community GPL download link let's click on the first download for the my sequel community server and let's download the MSI installer after the download let's double-click on the MSI file and let's follow the instruction for the standard installation in the setup file window just click custom and you will be able to select all the options that we want we don't need to install a bunch of different in we just need my sequel server so let's select the my sequel server let's move it to the product feature that we want to install select the version related to your operating system might I in my case is the 64-bit version and we don't need anything else let's click on advanced option and let's change the installation directory by default the software is going to install everything inside programs file but we want to actually create a folder and we want to move everything in the base C directory we are going to put everything inside the programs folder because these could create some authorization issues some permission issue and we want to avoid that so let's click ok let's click Next and let's click execute to install my sequel so that's pretty much it for today we saw how to install a local environment on Windows now you're pretty set to go to install whatever application you want you have everything you need to configure a local environment it's not on application start coding your own awesome app so thank you guys for watching and as usual happy coding
Info
Channel: Alessandro Castellani
Views: 459,409
Rating: undefined out of 5
Keywords: tutorial, windows 10, apache, mysql, php, local environment, web development
Id: kuMTZowwjus
Channel Id: undefined
Length: 17min 55sec (1075 seconds)
Published: Sun Jan 03 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.