Skip to content

Instantly share code, notes, and snippets.

@Bharat-B
Created October 5, 2021 17:11
Show Gist options
  • Save Bharat-B/134b3870f1a5b1b3e926425884bdea41 to your computer and use it in GitHub Desktop.
Save Bharat-B/134b3870f1a5b1b3e926425884bdea41 to your computer and use it in GitHub Desktop.
apt-get update
apt-get upgrade
apt install -y nginx
systemctl enable nginx
systemctl start nginx
apt-add-repository ppa:ondrej/php -y
systemctl enable php7.4-fpm
systemclt start php7.4-fpm
apt install -y php7.4 php7.4-{cli,gd,curl,mysql,ldap,zip,fileinfo,fpm,xml,mbstring,exif,pspell,imagick,bcmath}
apt install mariadb-server mariadb-client
systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation
wget -O composer-setup.php https://getcomposer.org/installer
php composer-setup.php --install-dir=/usr/bin --filename=composer
cd /var/www/html
composer create-project laravel/laravel .
chown www-data:www-data /var/www/html -R
mysql -e "CREATE USER 'laravel'@'localhost' IDENTIFIED BY '<PASSWORD-HERE>';"
mysql -e "CREATE DATABASE laravel;"
mysql -e "GRANT ALL PRIVILEGES ON laravel.* to 'laravel'@'localhost';"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment