A LAMP server is a combination of open-source software that is used to create dynamic websites and web applications. The acronym LAMP stands for Linux (operating system), Apache (web server), MySQL (database), and PHP (programming language).
Linux is used as the operating system for the server, Apache is the web server that processes and delivers web pages, MySQL is the database that stores and retrieves information, and PHP is the programming language used to create dynamic web pages and applications.
LAMP servers are commonly used for web development and hosting, as they provide a powerful and flexible platform for creating and delivering web-based applications and services. Many popular websites and web applications, such as WordPress and Drupal, are built on the LAMP stack :
To install a LAMP (Linux, Apache, MySQL, PHP) server on CentOS 9, follow these steps:
Update your system
Step 1
sudo dnf update
Step 2
dnf install apache2
systemctl enable apache2
systemctl enable apache2
systemctl status apache2
Step 3
dnf install mysql-server
mysql
systemctl start mysql.service
systemctl status mysql.service
systemctl enable mysql.service
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Passw0rd@321';
mysql_secure_installation
mysql -u root -p
Step 4
dnf install php
apt install libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
php -v
cd /var/www/html/
create a file
vim sample.php
<?php
phpinfo();
?>
:wq
No comments:
Post a Comment