Recently I have to migrate an old Laravel application of a client to a newer OS release Fedora 34. When it was developed Fedora-29 was Latest 😁.
The procedure is as bellow.
- Install Fedora 34
- Update the installation (sudo dnf update -y)
- Install Apache (sudo dnf install httpd)
- Install Mariadb, Mariadb server (sudo dnf install mariadb mariadb-server)
- Install PHP, PHP Mbstring, PHP zip, PHP Mysqlnd, PHP Mcrypt, PHP XML, PHP Json, PHP suMod ( sudo dnf install composer php php-mbstring php-zip php-mysqlnd php-mcrypt php-xml php-json mod_suphp -y)
- check if PHP is properly working or not by using following script
phpinfo.php
<?php
phpinfo();
?>
this script should be in /var/www/html/ directory which is by default document root for httpd server.
Point the browser to this file and see if it shows a page about PHP version and other details. If not then check if apache server is running.
- As super user create a laravel.conf file under /etc/httpd/conf.d directory with following content
<VirtualHost *:80>
ServerName your server name
DocumentRoot /var/www/html/laravel_project/public
<Directory /var/www/html/laravel_project>
AllowOverride All
</Directory>
</VirtualHost>
- Copy the laravel project to /var/www/html/ as super user and cgange the owner by chown -R apache:apache laravel_project
- Start Mariadb (sudo systemctl start mariadb)
This is almost complete. For your specific cases different services or tweaking may be required.
Laravel is a good framework for web-app development but for sometimes it is not getting more acceptance. Now the buzz word is Node . In a future article I may write on settingup and using Express framework for Web-App.
Thank you.