DEV Community

0xAirdropfarmer
0xAirdropfarmer

Posted on • Originally published at hackernoon.com on

Create Gym management in Laravel 5.7 part 0 :: Install Laravel on AWS cloud9

Create Gym management in Laravel 5.7 part 0 :: Install Laravel on AWS cloud9

journey sponsor

Fullstack Web Development With Laravel and Vue.js

Learn how to build fullstack web apps with Laravel 5, Laravel Mix, Vue js, Bootstrap 4 & Sass

Real Time Single Page Forum App with Pusher Laravel & vuejs

Making Things Realtime With Pusher in Single Page App

AWS Cloud9 provides cloud-based Ubuntu environment. It features a browser-based editor, that supports many syntaxes highlighting and word completion, a GUI-based GDB debugging, full control over a cloud-based Ubuntu environment, and many more features including themes, customizable layouts, and keyboard shortcuts. Since it’s cloud-based, you can continue working on your problem sets even if you use a different computer!

and you can integrate with other AWS service like Lambda, Codestar, Light Sail

in this chapter I’ve walkthrough if we need to follow me

you need AWS account

try search for Cloud9

next we create environment

fill name and description

next

choose type of environment and instance type for more description you’ve seen in image

last step we seen instance summary

then wait…

well well you got new playground

try uncover new thing with your self

Install Laravel 5.7

this version require php 7.1.3 or higher for now php in this machine is 5.6

and when you try apt-get

because Amzon linux based on Centos

so first thing we need to remove php 5.6 with this command

sudo yum remove php56*

we remove everything relate php5.6 with *

and we install everything relate php 7.2 with this command

sudo yum install php72*

next try php -v

next install Composer

navigate tocomposer download page

we use php in terminal

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash\_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP\_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

copy paste in terminal

when installer succes you’ve seen composer.phar in file manager

next try call composer

this case we need to call long command alway it’s lot of waste of time

then we need to alias composer command with

sudo mv composer.phar /usr/local/bin/composer

now you can call composer directly

Install Laravel 5.7

using command

composer create-project laravel/laravel

when run finish you’ve seen in file manager

next we’ve using Sqlite for dev mode . so open up .env

change mysql to sqlite

and remove or insert comment

and don’t forget move every file in laravel folder to root directory

now try php artisan migrate

error come from we forget create sqlite file so easy way create with file manager

Now php artisan migrate again

Next we start server using php built-in server with artisan command on port 8080 because cloud9 allow port 8080,8081 and 8082

then choose preview and select Preview Running Application

you’ve see new window appear in side of terminal

my god I got file manager , file editor , terminal and browser in one page

and you can open up in new tab

gotcha we’ve finish setup Laravel on AWS cloud9

but isn’t enough in next post I’ve create Github repository then push to deploy on Heroku for end up Dev workflow

Closing Sponsor

The Ultimate Advanced Laravel Pro course (incl Vuejs)

Laravel 5.7 Ecommerce Shop

Learn More.

Closing Notes:

common pirate get on black pearl if you need explore Github Ocean with me

if you need fundraise that journey


Top comments (3)

Collapse
 
azazqadir profile image
Muhammad Azaz Qadir

Manually installing Laravel on AWS is quite difficult and time taking. You must install each component individual and then configure it with Laravel. Furthermore, the management of the server, for example, patching and upgrading components can also take efforts and time. There are some platforms that allows hosting on Laravel server without having to manually install and configure the server though.

Collapse
 
martin_52 profile image
Martingray

Cloudways is a good platform, but I recently used Devrims, which provides more options in terms of customization, feature, and control. My Laravel Application uses a different database for different modules and Devrims provides me a one-click feature to create multiple databases and install other database services like MongoDB, ElasticSearch etc. I can also connect any internal and external resources with my Laravel server using the security section and very advanced one-click features compared to cloudways.

The good thing is I can select a cloud provider like AWS or DigitalOcean. Also, it's my choice to select the TECH Stack because they offer both LAMP and LEMP for Hosting Laravel applications.

Collapse
 
rockykev profile image
Rocky Kev

Wanted to let you know that all your links are broken.