Last Updated On By Khizer Ali
Table of Contents
Lamp is an example of web server stack. Mostly when people use windows as its operating system then it’s called WAMP, similarly if you use Solaris it will become SAMP and MAMP for Macintosh.
Sometimes people use Pearl or python as programing language. How to install LAMP on fedora, you need to make sure, you have root privileges or you have the privilege to Sudo commands to run the commands throughout this article.
L in lamp stands for Linux. In this article I will show you how to install LAMP in different Linux distributed OS.
A in Lamp stands for Apache. Apache is the most widely used web server, it allows users to serve content on the web.
M stands for MariaDB or MySql. In this article we cover both and explore how to install both databases.
P is PHP or pearl as the server-side programming language. In this article we learn how to install PHP as it the most widely used language.
Fedora is a Linux distributed operating system which uses RPM package manager and RPM packages are easier to figure. RPM also has more features such as confirmation of installed packages, history and rollback.
As fedora is a Linux distributed OS then the L part in the Lamp is already covered. If you don’t have fedora installed as your OS, then you need to first install it then you can proceed.
sudo dnf update u-y
HTTPD stands for Hypertext Transfer Protocol daemon developed
You can install Apache as you web server by typing the following command.
sudo dnf -y install httpd
It will ask for your password as this command is root privileged. Go ahead and enter your password and continue.
After the installation is you can check if its successfully installed by starting the HTTPD service through the following command.
sudo systemctl start httpd
Now enable your httpd:
sudo systemctl enable httpd
You will get a confirmation page in your browser
If it doesn’t work then that means your firewall is running and preventing your HTTP and HTTPS traffic. Adjust your firewall by commanding
sudo firewall-cmd --add-service={http,https} --permanent
then reload, this should work for your installation
sudo firewall-cmd --reload
sudo dnf -y install mysql-community-server
install https://repo.mysql.com//mysql80-community-release-fc31-1.noarch.rpm
Add MySQL 8.0 repository to Fedora 30
sudo dnf -y install https://repo.mysql.com/mysql80-community-release-fc30-1.noarch.rpm
Add MySQL 8.0 repository to Fedora 29
sudo dnf -y install https://repo.mysql.com/mysql80-community-release-fc29-1.noarch.rpm
now you need to start and enable your MySQL
sudo systemctl start mysqld.service
sudo systemctl enable mysqld.service
vi /etc/yum.repos.d/mysql-community.repo
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/fc/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Save and exit
sudo dnf install mariadb-server
when the installation is completed, start and enable your installed MariaDB
sudo systemctl start mariadb
sudo systemctl enable mariadb
you can check if MariaDB is correctly installed by interacting with it
MySQL -u root -p
Install PHP 7.3 on Fedora 30
sudo dnf -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
to install Fedora 29 and 30 first download Remi repository
Install PHP 7.3 on Fedora 29
sudo dnf install -y http://rpms.remirepo.net/fedora/remi-release-29.rpm
Install PHP 7.3 on Fedora 28
sudo dnf -y install http://rpms.remirepo.net/fedora/remi-release-28.rpm
Now enable the repository and install php 7.3 on Fedora 28/29
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --set-enabled remi-php73
sudo dnf config-manager --set-enabled remi