Install Apache, PHP, and MySQL on Fedora 43
If you’re setting up a local development or testing environment on Fedora, the classic Apache + PHP + MySQL stack is still a rock-solid choice. In this guide, we’ll walk through installing and configuring Apache (HttpD), PHP via the Remi repository, MySQL, phpMyAdmin, and Composer.
Let’s get your web stack up and running.
1. Install Apache (HttpD)
Apache is the web server that will handle HTTP requests and serve your application. Run the following commands one by one.
sudo dnf install httpd -y
sudo systemctl start httpd.service
Once started, Apache should be accessible at:
http://localhost
If you want Apache to start automatically on boot:
sudo systemctl enable httpd.service
2. Install PHP Using the Remi Repository
Fedora’s default PHP versions can lag behind. The Remi repository provides up-to-date and well-maintained PHP builds.
Add the Remi Repository
sudo dnf install http://rpms.remirepo.net/fedora/remi-release-43.rpm
Check available PHP versions
dnf module list php
Enable PHP 8.4 from Remi
sudo dnf module enable php:remi-8.4
Install PHP and its extensions
sudo dnf install php php-bcmath php-cli php-common php-intl php-sqlite3 php-mysqlnd php-opcache php-gd php-mbstring php-xml php-pdo php-zip
Restart Apache (HttpD)
sudo systemctl restart httpd.service
3. Install MySQL Community Server
Next up is MySQL, the database engine.
sudo dnf install community-mysql-server
Enable and start the MySQL service:
sudo systemctl enable mysqld
sudo systemctl start mysqld
Run the security script to set a root password and harden your installation:
sudo mysql_secure_installation
Follow the prompts to:
- Set a root password
- Remove anonymous users
- Disable remote root login
- Remove test databases
4. Install phpMyAdmin
phpMyAdmin provides a convenient web UI for managing MySQL databases.
sudo dnf install phpMyAdmin php-mysqlnd php-gettext -y
Restart Apache (HttpD)
sudo systemctl restart httpd.service
phpMyAdmin is typically accessible at:
http://localhost/phpmyadmin
5. Install Composer
Composer is the de facto dependency manager for PHP projects.
Download Composer
Install Composer following the official instructions from:
https://getcomposer.org/download/
Add Composer to Your PATH (ZSH)
Edit your .zshrc file:
nano ~/.zshrc # or .bashrc
Add the following line at the end:
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
Save the file and reload your shell configuration:
source ~/.zshrc # or .bashrc
Verify installation:
composer --version
Final Thoughts
At this point, you’ve got a complete Fedora-based web development stack:
- Apache (HttpD)
- PHP 8.4 (via Remi Repository)
- MySQL (Community Server)
- phpMyAdmin
- Composer
This setup works great for local development, prototyping, and even lightweight production workloads. From here, you can start deploying frameworks like Laravel, Symfony, or plain PHP apps with confidence.
Happy Coding!
Process Followed
1. Discover
In this process, I learn more about the requirements from you and/or from the client, and come up with varios permutations and combinations to meet the requirements.
2. Design
Once I learn properly, I do the design of the requirements that you gave keeping things aesthetically pleasing & useable for your audience.
3. Develop
Once you and/or the client is happy with the design(s), I start with the development process of the said requirements.
4. Deploy
After development, I will send the developed task to the client for reviewing. Once confirmed, will be deployed to the live server.
Tech Stack
HTML 5
CSS 3
TailwindCSS
JavaScript
PHP
MySQL
Laravel
VueJs
Spare time Projects
Few of the simple projects simply to learn.