Hi everyone, I want to install Laravel on my Linux VPS manually. Any help or advice will be appreciated.
Install Laravel on my Linux VPS
Collapse
Unconfigured Ad Widget
Collapse
X
-
Here are the steps to follow:
First, you need to log in to your VPS using SSH.
Step 1. Update your system
First, update your package list and upgrade installed packages to avoid compatibility issues:- sudo apt update && sudo apt upgrade -y
Laravel requires PHP, Composer, and a web server (Apache or Nginx). Install them with:- sudo apt install php php-cli php-mbstring php-xml php-bc math php-json php-common php-zip curl git unzip -y
- curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer
- composer create-project --prefer-dist laravel/laravel project-name
- sudo chown -R www-data:www-data /var/www/project-name && sudo chmod -R 775 /var/www/project-name/storage /var/www/project-name/bootstrap/cache
- sudo apt install apache2 && sudo a2enmod rewrite && sudo systemctl restart apache2
- sudo apt install nginx
- php artisan key:generate
- mysql -u root -p -e "CREATE DATABASE laravel_db;"
By following these steps, laravel will be installed on your VPS, and you can start building your website or application.
Comment