Skip to content

backend-timedoor/lemp-laravel

 
 

Repository files navigation

LEMP Server Installer for Laravel

GitHub release (latest by date) GitHub all releases GitHub license

LEMP Laravel is automation bash script to install LEMP Stack (Linux, Nginx, MySQL and PHP). The script also install essential services that required by Laravel like redis cache and supervisord. Tested on AWS EC2 Ubuntu 18.04 LTS and Ubuntu 20.04 LTS server.

New Update: LEMP Laravel script for Centos see README_CENTOS.md

lemp-laravel

Installation

Login as root

  $ sudo su -

Install essential tools

  $ apt-get install screen wget curl vim

Create screen session

  $ screen

Quick Installer (Option 1)

Use quick bash installer with default settings:

  $ curl https://raw.githubusercontent.com/backend-timedoor/lemp-laravel/master/lemp-laravel.sh | bash

Manual Install with Custom Variables (Option 2)

  $ wget https://raw.githubusercontent.com/backend-timedoor/lemp-laravel/master/lemp-laravel.sh
  $ vim lemp-laravel.sh

Variable Settings

Here are variables that you can change base on your need.

Variables Default Note
PHP_VERSION 7.4 Find LTS support https://www.php.net/supported-versions.php
PHPMYADMIN_VERSION 5.1.3 Check latest version https://www.phpmyadmin.net/downloads/
NVM_VERSION v0.39.1 Check latest version https://github.com/nvm-sh/nvm/releases
NODE_VERSION v16.14.2 Find LTS support https://nodejs.org/en/about/releases/
NGINX_MAX_BODY_SIZE 64M Nginx max body size
PHP_MEMORY_LIMIT 128M PHP memory limit
PHP_UPLOAD_MAX_FILESIZE 5M PHP upload max file size
PHP_POST_MAX_SIZE 5M PHP post max size
PHP_MAX_EXECUTION_TIME 300 PHP max execution time (in seconds)
PHP_MAX_INPUT_TIME 300 PHP max input time (in seconds)
PHP_MAX_FILE_UPLOAD 100 PHP max file upload
FPM_MAX_CHILDREN 50 PHP FPM max children
FPM_START_SERVERS 20 PHP FPM start servers
FPM_MIN_SPARE_SERVERS 10 PHP FPM min spare servers
FPM_MAX_SPARE_SERVERS 20 PHP FPM max spare servers
FPM_MAX_REQUESTS 500 PHP FPM max requests
REDIS_MAX_MEMORY 128mb Redis max memory

Execute the script

  $ chmod +x lemp-laravel.sh
  $ ./lemp-laravel.sh

Troubleshoot

If there's Broken pipe in ssh connection you can continue the installation.

List screen sessions and find the session id (SID)

  $ screen -ls

Restore screen session

  $ screen -r $SID

Contributing

contributions-wellcome

Contributions are always welcome!

License

Licensed under the MIT License, see LICENSE for more information.

About

LEMP Laravel Installer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%