Environment Setup
Linux Setup Guide
For Ubuntu, Debian, and related distributions.
Option A: The "php.new" Script (Recommended)
This script automates the installation of PHP, Composer, and Laravel.
Instructions
-
Open Terminal:
- On Ubuntu, press
Ctrl+Alt+T.
- On Ubuntu, press
-
Copy the Command:
/bin/bash -c "$(curl -fsSL https://php.new/install/linux)" -
Run It: Paste into your terminal (Right-click > Paste) and hit
Enter. -
Completion: Once finished, close and reopen your terminal.
Option B: Manual Installation (APT)
If the script doesn't work for your distribution or you prefer control.
-
Update Packages:
sudo apt update -
Install PHP & Extensions:
sudo apt install php-cli php-mbstring php-xml php-bcmath php-curl php-zip php-intl php-mysql php-pgsql -
Install Composer:
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer -
Install Node.js:
sudo apt install nodejs npm
Database Setup
You will likely need a local database server.
For MySQL:
sudo apt install mysql-server
sudo mysql_secure_installation
For PostgreSQL:
sudo apt install postgresql
Was this page helpful?
Built with Documentation.AI
Last updated today