Deploy Laravel - Nginx - PHP - PHP-fpm - PHP extensions - Mysql - Certbot - Cronjobs
wget <https://raw.githubusercontent.com/peter-tharwat/new-ubuntu-laravel/master/script.sh> ; sudo chmod +x script.sh ; ./script.sh -d example.com
Install Laravel Extensions
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.1
-------
sudo add-apt-repository universe
sudo apt install php8.1 openssl php-fpm php-common php-curl php-json php-mbstring php-mysql php-xml php-zip php-gd php-cli php-xml php-imagick php-xml php-intl ;sudo apt install npm
Install Nginx & PHP & MySql & laravel Extensions ⇒ ONE LINE
sudo apt update ; sudo apt install nginx ; sudo ufw allow 'Nginx HTTP' ; sudo ufw allow 'Nginx HTTPS' ; sudo ufw allow OpenSSH ; sudo ufw enable ; sudo add-apt-repository universe ; sudo apt install php8.1 openssl php-fpm php-common php-curl php-json php-mbstring php-mysql php-xml php-zip php-gd php-cli php-xml php-imagick php-xml php-intl ;
sudo apt install mysql-server
run laravel application
mkdir example.com ; cd example.com ; sudo apt-get install git ; git init ; git remote add origin [] ; git pull origin master ; cp .env.example .env ; composer install ; php artisan key:generate ;
- after setting up database
php artisan migrate --seed ; chmod 777 -R storage
install browser shot
curl -sL <https://deb.nodesource.com/setup_14.x> | sudo -E bash -
sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev libxshmfence-dev
sudo npm install --global --unsafe-perm puppeteer
sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium