Skip to content

Instantly share code, notes, and snippets.

@jamesmurdza
Created October 4, 2024 18:41

Revisions

  1. jamesmurdza created this gist Oct 4, 2024.
    59 changes: 59 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    1. Update the System
    sudo apt update
    sudo apt upgrade







    2. Install PHP
    sudo apt install php php-mbstring php-xml php-bcmath php-json php-zip php-curl php-cli php-fpm php-common php-tokenizer php-mysql




    3. Install Composer
    curl -sS https://getcomposer.org/installer | php


    Step 2: Make Composer globally accessible:
    sudo mv composer.phar /usr/local/bin/composer
    sudo chmod +x /usr/local/bin/composer


    4. Install Laravel
    composer global require laravel/installer


    export PATH="$HOME/.config/composer/vendor/bin:$PATH"



    source /.bashrc # or source /.zshrc



    5. Create a New Laravel Project

    laravel new my_project



    6. Set Up Permissions


    You might need to give write permissions to some directories. These include storage and bootstrap/cache:


    sudo chmod -R 775 storage
    sudo chmod -R 775 bootstrap/cache
    sudo chown -R $USER:www-data storage bootstrap/cache



    7. Start the Laravel Development Server

    cd my_project
    php artisan serve