DEV Community

JohnDotOwl
JohnDotOwl

Posted on

Laravel 10 FrankenPHP with PHP 8.3 with Ubuntu 22.04

Operation System : Ubuntu 22.04 ARM
Server Provider : AWS - t4g.micro (2vCPU with 1GB Ram)

Before getting started with FrankenPHP, you need to prepare your operation system with libraries and PHP required for Laravel.

Update and Upgrade your Operating System

sudo apt update
sudo apt upgrade
sudo apt install zip unzip
Enter fullscreen mode Exit fullscreen mode

Install PHP 8.3

# Add Ondrej's PPA
sudo add-apt-repository ppa:ondrej/php 
# Press enter when prompted.
Enter fullscreen mode Exit fullscreen mode

Do another update & upgrade to grab the latest files from PHP 8.3(Ondrej's PPA)

sudo apt update
sudo apt upgrade
Enter fullscreen mode Exit fullscreen mode

Install new PHP 8.3 packages

sudo apt install php8.3 php8.3-cli php8.3-xml php8.3-{bz2,curl,mbstring,intl}
Enter fullscreen mode Exit fullscreen mode

Navigate to the work directory

cd /var/www
Enter fullscreen mode Exit fullscreen mode

Install Composer

sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"
Enter fullscreen mode Exit fullscreen mode

Most likely, you want to put the composer.phar into a directory on your PATH, so you can simply call composer from any directory (Global install), using for example:

sudo mv composer.phar /usr/local/bin/composer
Enter fullscreen mode Exit fullscreen mode
sudo composer create-project laravel/laravel project_name
Enter fullscreen mode Exit fullscreen mode

oops i'm still editing

Top comments (3)

Collapse
 
patrice_gaillard_d9f79c3f profile image
Patos.g

Hi thanks for this. seems to be cut. Where i can follow the end.

Collapse
 
spham profile image
spham

Hi
For database. Nothing has change ?
How to start project ?