Install Laravel in Ubuntu 22.04.3 LTS
Requirement
- Ctype PHP Extension
- cURL PHP Extension
- DOM PHP Extension
- Fileinfo PHP Extension
- Filter PHP Extension
- Hash PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PCRE PHP Extension
- PDO PHP Extension
- Session PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
How to Install PHP?
sudo apt install php php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-tidy php-imagick -y
How to check PHP version?
php -v
How to Install Composer?
wget https://getcomposer.org/download/latest-stable/composer.phar
sudo chown root:root composer.phar
sudo chmod +x composer.phar
sudo mv composer.phar /usr/local/bin/composer
How to Install Laravel?
composer create-project laravel/laravel myblog
Go to the myblog directory and check Artisan version
cd myblog
php artisan --version
How to Ran Laravel?
php artisan serve
Ran Laravel With Custom IP & Port?
php artisan serve --host=0.0.0.0 --port=8080