Skip to content

Instantly share code, notes, and snippets.

@jamesmurdza
Created October 4, 2024 18:41
Show Gist options
  • Save jamesmurdza/99f4a7ebd214e0b41dbc39deaa7d6614 to your computer and use it in GitHub Desktop.
Save jamesmurdza/99f4a7ebd214e0b41dbc39deaa7d6614 to your computer and use it in GitHub Desktop.
Laravel server
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment