Skip to content

Instantly share code, notes, and snippets.

@swarad07
Created November 21, 2024 19:55
Show Gist options
  • Select an option

  • Save swarad07/fd05ec1fb07e5e00cfe946c1d2fb6088 to your computer and use it in GitHub Desktop.

Select an option

Save swarad07/fd05ec1fb07e5e00cfe946c1d2fb6088 to your computer and use it in GitHub Desktop.
LAMP setup - D10
apt update && apt upgrade -y
// Add a new source
sudo nano /etc/apt/sources.list
deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main
apt update
// Install PHP 8.2
apt install php8.2 php8.2-cli php8.2-common php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-zip php8.2-opcache php8.2-imagick unzip -y
// Apache and MySQL
apt install apache2 mysql-server
mysql_secure_installation
// Others
install git -y
// Create MYSQL database and user
CREATE DATABASE drupal_db;
CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON drupal_db.* TO 'drupal_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
mysql -u drupal_user -p drupal_db < database_dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment