Last active
June 3, 2021 19:06
-
-
Save dinushchathurya/1ccaa06c61cc6d521275a1ac785fc7d9 to your computer and use it in GitHub Desktop.
This files includes all the command that you required to deploy Laravel on AWS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Update server environment | |
`sudo apt-get update` | |
## Install PHP PPA on your server | |
`sudo add-apt-repository ppa:ondrej/php` | |
## Install required PHP packages | |
`sudo apt-get install -y php7.2-cli php7.2-fpm php7.2-mbstring php7.2-mysql php7.2-curl php7.1-mcrypt php7.2-xml` | |
## To check PHP version | |
`php -v` | |
## Install MYSQL Server | |
`sudo apt-get install mysql-server` | |
## To access MYSQL server | |
`sudo mysql -u root -p` | |
## Install Nginx | |
`sudo apt-get install nginx` | |
## Install GIt | |
`sudo apt-get install git` | |
## Install Zip and Unzip | |
`sudo apt-get install zip unzip` | |
## Create new ssh key | |
`ssh-keygen -t rsa -b 4096 -C "github"` | |
## Copy ssh key | |
`cat id_rsa.pub` | |
## To check ssh is connected | |
`ssh -T git@github.com` | |
## Clone repository | |
`git clone <your repository> html ` | |
## Install Composer | |
`curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer` | |
## Install Composor on project directory | |
`composer install --no-dev` | |
## Create .env file | |
`cp .env.example .env` | |
## Key generation | |
`php artisan key:generate` | |
## Change directory to nginx | |
`cd to main then cd/etc/nginx` | |
## Open default dile in Vim editor | |
`sudo vim sites-available/default` | |
## Restart Nginx | |
`sudo service nginx restart` | |
## Give access to file storage | |
`sudo chmod -R 777 storage` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment