Wednesday, December 29, 2021

How To Install LAMP Stack On Rocky Linux 8 [Step-by-Step]

 LAMP stack is a collection of open-source software installed together to enable a server to host and run modern web applications written in server-side languages like PHP. LAMP is an acronym for Linux, Apache, MySQL/MariaDB, and PHP that work together to serve dynamic web content hosted on a server.
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐑𝐨𝐜𝐤𝐲 𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐆𝐫𝐞𝐞𝐧 𝐎𝐛𝐬𝐢𝐝𝐢𝐚𝐧)          | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:                    | 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
________________________________________________________________________________________________________________________
                            cat /etc/os-release ; getconf LONG_BIT ; hostname ; hostname -I
 
dnf -y update ; dnf groupinstall "Development Tools" -y
dnf install httpd httpd-tools mariadb-server mariadb php php-cli php-mysqlnd php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-curl php-opcache php-bcmath php-fpm php-common

systemctl enable httpd  mariadb php-fpm ;  systemctl start httpd mariadb php-fpm ; systemctl status httpd mariadb php-fpm
mysql_secure_installation

echo "<?php phpinfo() ?>" > /var/www/html/info.php
echo "Hello there, Apache webserver is now running" > /var/www/html/index.html

firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload
http://server.yourdomain.com
http://server.yourdomain.com/info.php
_________________________________________________________________________________________________________________________

No comments:

Post a Comment