Skip to content

Instantly share code, notes, and snippets.

@magarrent
Last active October 25, 2024 14:29
Show Gist options
  • Save magarrent/6326a5a3c18e1d7a13aeb7aed738d494 to your computer and use it in GitHub Desktop.
Save magarrent/6326a5a3c18e1d7a13aeb7aed738d494 to your computer and use it in GitHub Desktop.
LEMP Laravel - Ubuntu 22.04 - PHP 8.3 fpm - Nginx
sudo apt update
sudo apt install nginx mysql-server redis certbot acl git zip unzip -y
# PHP 8.3
sudo apt-get install ca-certificates apt-transport-https software-properties-common -y
add-apt-repository ppa:ondrej/php
sudo apt-get install php8.3 php8.3-fpm php8.3-mysql php8.3-cli php8.3-common php8.3-imap php8.3-redis php8.3-snmp php8.3-xml php8.3-zip php8.3-mbstring php8.3-curl php8.3-gd php8.3-soap php8.3-bcmath php8.3-intl php8.3-sqlite3
# Composer
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# Set MySql password
SELECT user,plugin,host FROM mysql.user WHERE user = 'root';
ALTER USER 'root' @'localhost' IDENTIFIED WITH mysql_native_password BY 'YOURPASSWORDHERE';
FLUSH PRIVILEGES;
# NodeJs 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment