How to install laravel 11 in ubuntu

How to install laravel 11 in ubuntu

Tuesday, October 22, 2024

tutorialsmaterial

In this blog

Laravel 11 new version of laravel

    By default laravel 11 connect SQLite database.first off all install SQLite database in computer. open the terminal and run command:

     sudo apt-get update
     sudo apt  install  sqlite3
    

    check the sqlite version

       sqlite3 --version
    
    

    Add default adapter and php driver for php

    sudo apt  install php-sqlite3
     sudo apt  install php-pgsql
    

    Install php other package

    sudo apt install  php8.3-zip php8.3-xml php8.3-sqlite3 php8.3-cli php8.3-common php8.3-fpm  php8.3-gd
    php8.3-mbstring php8.3-curl php8.3-bcmath
    

    check php version

    php --version
    
    
    

    again update

    sudo apt-get update 
    sudo apt-get upgrade -y
    sudo apt-get upgrade -y
    or
    sudo apt update && apt upgrade -y
    

    Install composer

    https://getcomposer.org/download/

    sudo apt install composer
    
    
    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');
    

    any location make folder

    mkdir foldername
    cd foldername
    

    run command

    composer create-project laravel/laravel=11 ProjectName
    or
    composer create-project laravel/laravel=11 laravel
    

    Run Server your pc ls show folder or project folder cd project foldername

    cd laravel
    php artisan serve
    

    INFO Server running on [http://127.0.0.1:8000].