for development
Apache or Nginx, MySQL/MariaDB and PHP-FPM are installed and configured to forward php-files to php-fpm or handle them via Modules.
Assuming "www" is your Apache Docroot,
mkdir www/joomla
unzip Downloads/Joomla_4.2.5-Stable-Full_Package.zip -d www/joomla/
public $dbtype = 'mysqli'; // Normally mysqli
public $host = 'localhost'; // This is normally set to localhost
public $user = 'root'; // Database username
public $password = 'root'; // Database password
public $db = 'joomla'; // Database name
sed -i 's/#__/jos_/g' installation/sql/mysql/*.sql
cd www/joomla
mysqladmin -u root -p create joomla
mysql -u root -p joomla -e 'SOURCE installation/sql/mysql/base.sql;'
mysql -u root -p joomla -e 'SOURCE installation/sql/mysql/extensions.sql;'
mysql -u root -p joomla -e 'SOURCE installation/sql/mysql/supports.sql;'
INSERT INTO `js_users` (`name`, `username`, `password`, `params`, `registerDate`, `lastvisitDate`, `lastResetTime`) VALUES ('Administrator2', 'admin2', 'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '', NOW(), NOW(), NOW());
INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_ID(),'8');
Access via http://localhost/joomla or create a vhost