Deploy Laravel app on EC2 Ubuntu server with Apache MySQL PHP PHPMyAdmin| PHP | AWS | Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello coders welcome to codepickup in this video i will show you how to deploy laravel or php project on ubuntu server i will guide you step by step how you can create ubuntu server in aws amazon web services after that we install apache server and php with their recommended modules we also see how you can install mysql server and php my admin last we deploy laravel project on server let's start with creating a ubuntu server in aws i already login in my aws account click on services easy to click on running instance let's click on launch instance type ubuntu press enter this is ubuntu server click on select this is a demo video so i am creating a free instance you can change it according to your needs click on configure instance details details i am not change anything in this section click on add storage you can increase the size of disk or you can change the disk type i'm not change anything in this also click on add text type name value demo laravel click on configure security group click on add rule select http select anywhere every time i'm creating a new security group for my new instances let's click on review and launch you can review the details of your instance if you want to change anything you can go back and update the details let's click on launch now you have to create a new key pair for your instance select create a new key pair a keypair name laravel demo download your key pair save file key file is downloaded let's i will show you this is my key for laravel demo application labs cut this file and put it in on my desktop now click on launch instance click on view instances it will take some time in activation now our new instance is running this is the public dns for this instance now copy this and let's run our instance is empty now let's go to the next step installation of apache server on above our ubuntu server if you have any error in the launching instance you can take help in my from my blog i already created my blog you can see here we already created our instance let's skip this now we have to connect server with our terminal to make a connection with putty you have to convert your pm file means your key file to ppk file for that we use puttygen footage and now load our pm file go to the desktop now select all files select our pm file click ok now click on save private key yes put it named laravel demo click on save our pm5 ppk file is generated let's connect the server from the putty for that you have to open putty now type your username here ubuntu ubuntu username is fixed for the ubuntu server now type at the rate now put it your server dns copy and paste now attach the ppk file under ssh click on oauth browse the ppk file this is my ppk file now click on open yes now put it connected with our server let's clear all this mess clear now this will be okay yes let's check the next step connect server with terminal edge done next step is install apache on server for the first we have to update all the modules of our server for that you have to type this command cop copy this command and then paste click enter it will download all the updates of our server modules update is done now upgrade all the modules over of our server copy click enter press yes y click enter all modules are upgraded let's clear all this check out our next step download the jeep extension on our server copy this enter zip or unzip module is installed now install apache copy this line and paste press enter right click yes enter apache is installed now restart the apache press enter apache is restarted next run the run our public dns copy if you can see this page it means apache is installed in our ubuntu server let's check the next step next step is installation of mysql server clear all this type clear press enter sudo apt install mysql hyphen server copy paste enter click yes enter it will take some time to install mysql server mysql server is installed now now secure the mysql server with password copy this press enter click yes now you have to select the level of your password i will select low for lower you have to type 0 0 press enter now you have to enter your password re-enter your password click enter now mysql server so my password is strength my password strength is 50. now if you want to continue with your new password press yes remove anonymous user click yes disallow root login remotely press n means no click enter remove test database and access to it [Music] i don't want to remove my test database so press n click enter reload your table privileges click yes press enter now mysql server is installed successfully let's check the next step we are done before installation of php let's install phpmyadmin database for that clear all this now type sudo sudo apt install php my admin press enter click yes select apache 2 press okay now configure database for php my admin with db config common select yes press enter now enter your password enter password for your php my admin your password press enter now password confirmation press enter php my admin is installed let's check the php my admin page slash php my admin it shows not found yes we have to change in one file for access the php my admin let's clear all this now type sudo nano is my text editor slash etc slash apache 2 slash apache 2 dot configuration we have to change in apache to dot configuration file press enter now go down at in the end of the page now type include space slash etc slash php my admin slash apache dot c oh and configuration let's save this file for save this file you have to click first control x now press yes and then enter now file is saved let's update our all modules in our server sudo apt update three packages can be upgraded if you want to upgrade the packages type sudo apt hyphen get upgrade next restart the apache sudo service finished apache 2 apache to restart press enter apache is restarted let's refresh this page it's reloading which takes some time finally we get our login page of phpmyadmin now you have for login you have to enter your username and then your password if you want to know what was the username of your phpmyadmin you can check here let's clear all this now type sudo nano slash etc slash php my admin slash config hyphen db dot php press enter this is my username phpmyadmin this is my password let's connect with you this username php my admin and the password click on go log in successfully in phpmyadmin let's try to create a new database you have no privileges to create a database for that you have to give privileges for creating a database to this user let's i will show you how you can give all the privileges to your php my admin user [Music] go to your terminal control x now type sudo mysql press enter now type grant or on star dot star to php my admin at the rate loca host semicolon now press enter now plus privileges enter privileges spelling is mistake pr i now press enter again mistake in privileges l e privileges press enter yes now exit press enter now try to create a database reload the page i think i got something error let's try again clear all this sudo mysql grant or on star dot star to php my admin at the rate localhost press enter now plus delay just press enter now exit let's refresh again you have to login again for showing all the privileges to your panel now if you want to create a database type your database name demo laravel select your collection create demo laravel database it created let's put it aside php my admin installed and running successfully let's go to the next step which is install php for installation php and all their recommended packages let's copy all this first clear paste now press enter click yes press enter php installed let's check it out with php welcome installed type php hyphen version v press enter uh php 7.2.2 clear all this let's check out phpinfo for that create a new file in this server create a new file sudo nano class where slash ww plus html slash info dot php enter now type php and php info now save this control x yes and then enter let's check this close my php admin copy this paste slash info.php press enter you can see your php version here and if you want to check all your extensions and modules you can check all of that and they are called php configuration you can check also here don't forget to delete this php info file let's delete this php intro file sudo rm slash where slash ww slash html slash info dot php press enter file is deleted next next we have to update all the packages restart the apache now our ubuntu server is ready for deploy the larval application for deploying laravel application we use filezilla i already created a larval application i will show you my larval application this is my larval application i will reload this page i will show you this working type testing testing gmail.com mobile number testing address amount click on submit this is razer pay payment gateway demo application net banking spi pay hundred click on success payment complete i will deploy this application on my server i already created a zip file clear all this let's upload the laravel application open filezilla click on site manager new site protocol which is sftp host first will be your dns port will be 22 logon type it key file user user age open to now key file is your larval demo dot ppk file let's connect you can see the status of your connection let's go to your home directory you have to put your larabel project on under the directory then www and then html this is my index page you can see index page in your browser if you remove this line now press enter this is index page this is the index page now remove this error in deleting the file we got an error in deleting a file which is permission denied [Music] okay okay our username is ubuntu and this file owner is root you have to change your owner which is ubuntu we will change the html directory owner to ubuntu for this you have to type on your terminal sudo change ownership hyphen r now type your username ubuntu now your directory path which is where ww html press enter let's refresh this now owner is root root let's refresh this now ubuntu each owner of this directory html directory now try to remove index.html delete now file is deleted let's try to get we got nothing let's upload our larval application this is zip file of larval application upload this file you can see the progress file is uploaded let's unzip the file for unzipping a file you have to type this command you have to first go to inside html directory for that you have to go home directory now type cd change directory where where cdw cd www cd html we inside the html directory now we unzip a file for unzip a file type command this unzip your file name demo.zip demo is file name now press enter the file is unzipping unzip is done let's refresh let's try to get got all the files in of our larval application my larval application is running in public folders so type public okay you have to type give a permission for your storage folder this is your storage folder you have to give a right permission if you want to give file permission from your filezilla you have to give right and then press ok but it's take lot of time to give permission so close this and giving permission from the terminal clear all this with clear command let's type sudo change mode iphone or 777 which is permissions of storage folder now give the path of your storage folder i already in my html directory so i have to give only storage folder storage folder name store it press enter let's refresh you can see i write permission is not here let's refresh now write permission are also now here you can check file permission file permissioning triple seven all the permissions are given to storage folder let's check it now reload the page now local application is successfully deployed let's try to make a payment [Music] it is payment hyphen initiate [Music] it shows not found okay you have to change in one file before you have to run your project open your terminal you have to rewrite your modules for that you have to type command first you have to go in your home directory root directory sorry root directory uh type cd space filled press enter now you are inside your root directory now type sudo a to e n mod space re write press enter enabling module rewrite to activate the new configuration you need to run restart apache before that you have to change in one file type sudo nano editor slash etc slash apache 2 slash apache 2 dot configuration press enter now go down a little bit here in the slashware slash ww we wear your larval project you have to put allow overwrite none to remove none type all now save for saving this file you have to press ctrl x now press yes now press enter now restart the apache sudo service slash apache 2 restart press enter apache restarted now try finally we got the our payment page let's try the payment enter name with testing testing at the gmail.com give any number address testing address amount 100 press submit net banking spi pay 100 rupees success payment complete you can see learner project is deployed successfully if you get any error you can comment it in comment section of the video i will surely try to resolve your error i will put my blog link in the description of the video you can get it from here here if you want to deploy a laravel application using elastic finish talk in aws you can click on i button if you like this video give a thumbs up put your feedback in comment sections and don't forget to subscribe my channel for getting the latest updates of my next tutorials goodbye and take care
Info
Channel: Code Pickup
Views: 12,460
Rating: undefined out of 5
Keywords: deploy laravel project on ubuntu server, deploy laravel app to ubuntu server, how to deploy laravel project on ubuntu server, install mysql server on ubuntu, install phpmyadmin on ubuntu, deploy php application on ubuntu server, setup ubuntu server, install apache on ubuntu server, deploy laravel app to ubuntu server step by step, deploy laravel project on ubuntu ec2 instance, deploy php application on apache linux, how to deploy php website on linux server
Id: x2MbZKamYaM
Channel Id: undefined
Length: 42min 39sec (2559 seconds)
Published: Mon Aug 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.