{"id":16787,"date":"2026-05-25T14:46:27","date_gmt":"2026-05-25T14:46:27","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=16787"},"modified":"2026-05-25T14:46:31","modified_gmt":"2026-05-25T14:46:31","slug":"how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/","title":{"rendered":"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\n  Installing LEMP (LAMP) on AlmaLinux 10 is one of the best ways to install a high-performance web application on Linux. LEMP stack is the combination of Linux, NGINX, MySQL, and PHP in order to provide a fast, secure, and scalable web hosting environment for modern websites and applications.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The <a href=\"https:\/\/almalinux.org\/\">AlmaLinux 10 distribution<\/a> is gaining popularity with enterprises due to its long-term stability, RHEL compatibility, security, and package management features. AlmaLinux can be used in combination with NGINX, MySQL, and PHP to host WordPress, Laravel applications, cloud-native web deployments, eCommerce websites, and APIs.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Table of Content<\/strong>\n<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#post-16787-_i31um73vpi23\">What Is a LEMP Stack?<\/a><\/li>\n\n\n\n<li><a href=\"#Why-Use-AlmaLinux-10-for-a-LEMP-Stack\">Why Use AlmaLinux 10 for a LEMP Stack?<\/a><\/li>\n\n\n\n<li><a href=\"#post-16787-_97sdp8un4aqa\">Install LEMP Stack on AlmaLinux 10 for NGINX, MySQL, and PHP Hosting<\/a><\/li>\n\n\n\n<li><a href=\"#post-16787-_b3d1xt7lg3oy\">Common LEMP Stack Commands on AlmaLinux 10<\/a><\/li>\n\n\n\n<li><a href=\"#post-16787-_rdc1tas2gwan\">Security a LEMP Stack &#8211; Expert DevOps Practices<\/a><\/li>\n\n\n\n<li><a href=\"#post-16787-_2a8y2ey1u4m0\">Why the LEMP Stack Is Popular for Modern Web Hosting<\/a><\/li>\n\n\n\n<li><a href=\"#post-16787-_m58374w56d48\">Conclusion<\/a><br>  <\/li>\n<\/ul>\n\n\n\n<h2 id=\"What-Is-a-LEMP-Stack\" class=\"wp-block-heading\"><a id=\"post-16787-_i31um73vpi23\"><\/a><strong>What Is a LEMP Stack?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\n  LEMP stack is a widely used web development stack for dynamic websites and web applications to be hosted using open source technologies.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  LEMP stands for:\n<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linux \u2013 Operating system<\/li>\n\n\n\n<li> NGINX \u2013 Web server<\/li>\n\n\n\n<li>MySQL \u2013 Database server<\/li>\n\n\n\n<li>PHP \u2013 Server-side scripting language<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The LEMP stack replaces the traditional LAMP stack with <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-nginx-on-ubuntu-22-04\/\">NGINX<\/a>, a high-performance, low-resource, and highly scalable web server.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The LEMP stack is commonly used in modern web applications, such as websites built with WordPress, PHP applications, REST APIs, <a href=\"https:\/\/www.greenwebpage.com\/vpshosting.php\">cloud VPS hosting<\/a>, enterprise web servers, and frameworks like Laravel and Symfony.\n<\/p>\n\n\n\n<h2 id=\"Why-Use-AlmaLinux-10-for-a-LEMP-Stack\" class=\"wp-block-heading\"><a id=\"post-16787-_73xyfygiduly\"><\/a><strong>Why Use AlmaLinux 10 for a LEMP Stack?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\n  AlmaLinux 10 is an enterprise-stable and <a href=\"https:\/\/greenwebpage.com\/community\/how-to-check-almalinux-version\/\">secure version<\/a> of RHEL, with no modifications necessary to make it compatible.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The AlmaLinux 10 platform makes running a LEMP stack more convenient than ever before, offering long-term support for Linux, enterprise-grade security patches, a solid package system, deep integration with SELinux, server optimization, great VPS and cloud support, and highly stable DNF package management for production workloads.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  AlmaLinux is lightweight, stable, and suitable for production-level web hosting.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_4v1ofelqlh8u\"><\/a><strong>Prerequisites<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Here are some prerequisites for installing the LEMP stack:\n<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-almalinux-10-on-vmware-workstation\/\">AlmaLinux 10 server installed<\/a><\/li>\n\n\n\n<li>Root\/sudo privileges are available<\/li>\n\n\n\n<li>An active internet connection<\/li>\n\n\n\n<li>This requirement is for minimum storage.<\/li>\n\n\n\n<li><a href=\"https:\/\/greenwebpage.com\/community\/how-to-set-up-a-basic-firewall-on-almalinux-10-using-firewalld\/\">Firewall access configured<\/a><br>  <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16787-_97sdp8un4aqa\"><\/a>How to Install LEMP Stack on AlmaLinux 10 for NGINX, MySQL, and PHP Hosting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The LEMP stack on AlmaLinux 10 combines NGINX, MySQL, and PHP to create a secure and scalable Linux web hosting environment for WordPress, Laravel, and modern web applications. \n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_3g0v2nconkvp\"><\/a><strong>Step 1: Install NGINX on AlmaLinux 10<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  NGINX is a fast web server that is used to power websites, APIs, reverse proxy services, and load-balanced applications.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-nginx-on-almalinux-10\/\">Install NGINX<\/a>:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo dnf install nginx -y\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1073\" height=\"564\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-1.png\" alt=\"  sudo dnf install nginx -y\n\" class=\"wp-image-16788\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-1.png 1073w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-1-300x158.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-1-1024x538.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-1-768x404.png 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Enable and start the NGINX service:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl enable nginx\n<\/p><p>\n  sudo systemctl start nginx\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1075\" height=\"232\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-2.png\" alt=\"sudo systemctl enable nginx\" class=\"wp-image-16789\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-2.png 1075w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-2-300x65.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-2-1024x221.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-2-768x166.png 768w\" sizes=\"(max-width: 1075px) 100vw, 1075px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Check the status of the service:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl status nginx\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1074\" height=\"614\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-3.png\" alt=\"sudo systemctl status nginx\" class=\"wp-image-16790\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-3.png 1074w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-3-300x172.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-3-1024x585.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-3-768x439.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_bzb73kk6m37g\"><\/a><strong>Step 2: Configure Firewall for NGINX<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Enable traffic for HTTP and HTTPS in the AlmaLinux firewall.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Allow HTTP:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo firewall-cmd &#8211;permanent &#8211;add-service=http\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"135\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-4.png\" alt=\"  sudo firewall-cmd --permanent --add-service=http\n\" class=\"wp-image-16791\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-4.png 1074w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-4-300x38.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-4-1024x129.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-4-768x97.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Allow HTTPS:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo firewall-cmd &#8211;permanent &#8211;add-service=https\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1068\" height=\"132\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-5.png\" alt=\"  sudo firewall-cmd --permanent --add-service=https\n\" class=\"wp-image-16792\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-5.png 1068w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-5-300x37.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-5-1024x127.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-5-768x95.png 768w\" sizes=\"(max-width: 1068px) 100vw, 1068px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Reload the firewall:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo firewall-cmd &#8211;reload\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1061\" height=\"127\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-6.png\" alt=\"  sudo firewall-cmd --reload\n\" class=\"wp-image-16793\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-6.png 1061w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-6-300x36.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-6-1024x123.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-6-768x92.png 768w\" sizes=\"(max-width: 1061px) 100vw, 1061px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Verify firewall services:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo firewall-cmd &#8211;list-services\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1073\" height=\"127\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-7.png\" alt=\"  sudo firewall-cmd --list-services\n\" class=\"wp-image-16794\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-7.png 1073w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-7-300x36.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-7-1024x121.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-7-768x91.png 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_e1f5aopmcxs4\"><\/a><strong>Step 3: Test the NGINX Web Server<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Go to a web browser and type your server IP address:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  http:\/\/your-server-ip\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1168\" height=\"775\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-8.png\" alt=\"  http:\/\/your-server-ip\n\" class=\"wp-image-16795\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-8.png 1168w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-8-300x199.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-8-1024x679.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-8-768x510.png 768w\" sizes=\"(max-width: 1168px) 100vw, 1168px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  If NGINX has been installed properly, then the default NGINX welcome page will appear.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  You can also check locally with:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  curl http:\/\/localhost\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"746\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-9.png\" alt=\"  curl http:\/\/localhost\n\" class=\"wp-image-16796\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-9.png 1072w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-9-300x209.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-9-1024x713.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-9-768x534.png 768w\" sizes=\"(max-width: 1072px) 100vw, 1072px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_inv30uvppfl0\"><\/a><strong>Step 4: Install MySQL Server on AlmaLinux 10<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  MySQL is one of the most popular relational database management systems (RDBMS) used for Linux Web Hosting.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Install MySQL server:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo dnf install mysql-server -y\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1070\" height=\"127\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-10.png\" alt=\"  sudo dnf install mysql-server -y\n\" class=\"wp-image-16797\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-10.png 1070w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-10-300x36.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-10-1024x122.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-10-768x91.png 768w\" sizes=\"(max-width: 1070px) 100vw, 1070px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Run the following commands to enable and start MySQL:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl enable mysqld\n<\/p><p>\n  sudo systemctl start mysqld\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1076\" height=\"360\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-11.png\" alt=\"sudo systemctl enable mysqld\" class=\"wp-image-16798\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-11.png 1076w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-11-300x100.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-11-1024x343.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-11-768x257.png 768w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Check if the MySQL service is running:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl status mysqld\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1071\" height=\"630\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-12.png\" alt=\"sudo systemctl status mysqld\" class=\"wp-image-16799\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-12.png 1071w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-12-300x176.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-12-1024x602.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-12-768x452.png 768w\" sizes=\"(max-width: 1071px) 100vw, 1071px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_fx56zq83ceyy\"><\/a><strong>Step 5: Secure the MySQL Installation<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Run the MySQL secure installation script:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo mysql_secure_installation\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1065\" height=\"504\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-13.png\" alt=\"  sudo mysql_secure_installation\n\" class=\"wp-image-16800\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-13.png 1065w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-13-300x142.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-13-1024x485.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-13-768x363.png 768w\" sizes=\"(max-width: 1065px) 100vw, 1065px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The MySQL secure installation script is used to help set the MySQL root password, to <a href=\"https:\/\/greenwebpage.com\/community\/how-to-create-manage-and-delete-users-in-almalinux-10\/\">remove anonymous users<\/a>, to disable remote root login, to remove test databases, and to improve the overall security of the database server in a production environment.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Do use a strong password for your database in production environments.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_hhkawkdi67gw\"><\/a><strong>Step 6: Install PHP on AlmaLinux 10<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  WordPress, Laravel, Drupal, Magento, and other web apps use PHP as their server-side language.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\">Install PHP<\/a> and required extensions:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo dnf install php php-fpm php-mysqlnd php-cli php-gd php-mbstring php-xml php-curl php-zip -y\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"475\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-14.png\" alt=\"  sudo dnf install php php-fpm php-mysqlnd php-cli php-gd php-mbstring php-xml php-curl php-zip -y\n\" class=\"wp-image-16801\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-14.png 1074w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-14-300x133.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-14-1024x453.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-14-768x340.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Specify the PHP version:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  php -v\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"237\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-15.png\" alt=\"  php -v\n\" class=\"wp-image-16802\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-15.png 1072w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-15-300x66.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-15-1024x226.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-15-768x170.png 768w\" sizes=\"(max-width: 1072px) 100vw, 1072px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_r2ipw9b3uovv\"><\/a><strong>Step 7: Configure PHP-FPM<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  NGINX uses PHP-FPM to process PHP requests. Enable &amp; start PHP-FPM:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl enable php-fpm\n<\/p><p>\n  sudo systemctl start php-fpm\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1076\" height=\"232\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-16.png\" alt=\"sudo systemctl enable php-fpm\" class=\"wp-image-16803\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-16.png 1076w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-16-300x65.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-16-1024x221.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-16-768x166.png 768w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Check PHP-FPM status:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl status php-fpm\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1076\" height=\"676\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-17.png\" alt=\"sudo systemctl status php-fpm\" class=\"wp-image-16804\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-17.png 1076w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-17-300x188.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-17-1024x643.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-17-768x482.png 768w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Modify the PHP-FPM configuration:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo nano \/etc\/php-fpm.d\/www.conf\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Find these lines:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  user = apache\n<\/p><p>\n  group = apache\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1071\" height=\"494\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-18.png\" alt=\"\/etc\/php-fpm.d\/www.conf\" class=\"wp-image-16805\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-18.png 1071w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-18-300x138.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-18-1024x472.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-18-768x354.png 768w\" sizes=\"(max-width: 1071px) 100vw, 1071px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Replace them with:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  user = nginx\n<\/p><p>\n  group = nginx\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"452\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-19.png\" alt=\"\/etc\/php-fpm.d\/www.conf\" class=\"wp-image-16806\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-19.png 1074w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-19-300x126.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-19-1024x431.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-19-768x323.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Save the file and restart PHP-FPM:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl restart php-fpm\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1075\" height=\"92\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-20.png\" alt=\"sudo systemctl restart php-fpm\" class=\"wp-image-16807\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-20.png 1075w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-20-300x26.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-20-1024x88.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-20-768x66.png 768w\" sizes=\"(max-width: 1075px) 100vw, 1075px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_sq5ve9p44h1y\"><\/a><strong>Step 8: Configure NGINX for PHP Processing<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Edit the default <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-nginx-on-almalinux-10\/\">NGINX configuration<\/a>:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo nano \/etc\/nginx\/conf.d\/default.conf\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Add the following configuration:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  server {\n<\/p><p>\n      listen 80;\n<\/p><p>\n      server_name _;\n<\/p><p>\n      root \/usr\/share\/nginx\/html;\n<\/p><p>\n      index index.php index.html;\n<\/p><p>\n      location \/ {\n<\/p><p>\n          try_files $uri $uri\/ =404;\n<\/p><p>\n      }\n<\/p><p>\n      location ~ \\.php$ {\n<\/p><p>\n          include fastcgi_params;\n<\/p><p>\n          fastcgi_pass unix:\/run\/php-fpm\/www.sock;\n<\/p><p>\n          fastcgi_index index.php;\n<\/p><p>\n          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n<\/p><p>\n      }\n<\/p><p>\n  }\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1045\" height=\"780\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-21.png\" alt=\"\/etc\/nginx\/conf.d\/default.conf\" class=\"wp-image-16808\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-21.png 1045w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-21-300x224.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-21-1024x764.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-21-768x573.png 768w\" sizes=\"(max-width: 1045px) 100vw, 1045px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Test the <a href=\"https:\/\/greenwebpage.com\/community\/how-to-set-up-nginx-server-blocks-on-ubuntu-24-04\/\">NGINX configuration<\/a>:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo nginx -t\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1070\" height=\"211\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-22.png\" alt=\"  sudo nginx -t\n\" class=\"wp-image-16809\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-22.png 1070w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-22-300x59.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-22-1024x202.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-22-768x151.png 768w\" sizes=\"(max-width: 1070px) 100vw, 1070px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  If it appears to be correct syntax, restart NGINX:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo systemctl restart nginx\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1077\" height=\"97\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-23.png\" alt=\"sudo systemctl restart nginx\" class=\"wp-image-16810\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-23.png 1077w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-23-300x27.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-23-1024x92.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-23-768x69.png 768w\" sizes=\"(max-width: 1077px) 100vw, 1077px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_51291vkp0lg6\"><\/a><strong>Step 9: Test PHP Processing on NGINX<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Write a <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\">PHP test file<\/a>:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo nano \/usr\/share\/nginx\/html\/info.php\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Include the following information:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  &lt;?php\n<\/p><p>\n  phpinfo();\n<\/p><p>\n  ?&gt;\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1077\" height=\"201\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-24.png\" alt=\"\/usr\/share\/nginx\/html\/info.php\" class=\"wp-image-16811\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-24.png 1077w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-24-300x56.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-24-1024x191.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-24-768x143.png 768w\" sizes=\"(max-width: 1077px) 100vw, 1077px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Save the file and open it in a web browser:\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The PHP information page will display if PHP is set up properly.\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  http:\/\/your-server-ip\/info.php\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1165\" height=\"734\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-25.png\" alt=\"  http:\/\/your-server-ip\/info.php\n\" class=\"wp-image-16812\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-25.png 1165w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-25-300x189.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-25-1024x645.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-25-768x484.png 768w\" sizes=\"(max-width: 1165px) 100vw, 1165px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  To secure the file, remove the file after testing:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo rm -f \/usr\/share\/nginx\/html\/info.php\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1068\" height=\"100\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-26.png\" alt=\"  sudo rm -f \/usr\/share\/nginx\/html\/info.php\n\" class=\"wp-image-16813\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-26.png 1068w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-26-300x28.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-26-1024x96.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-26-768x72.png 768w\" sizes=\"(max-width: 1068px) 100vw, 1068px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_wplw7zkzm9rf\"><\/a><strong>Step 10: Enable SELinux Permissions for NGINX and PHP<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  AlmaLinux 10 is based on SELinux, which is a higher level of security for Linux operating systems.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Turn on NGINX <a href=\"https:\/\/greenwebpage.com\/community\/how-to-configure-network-settings-on-almalinux-10\/\">network connections<\/a>:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo setsebool -P httpd_can_network_connect 1\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1075\" height=\"111\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-27.png\" alt=\"  sudo setsebool -P httpd_can_network_connect 1\n\" class=\"wp-image-16814\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-27.png 1075w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-27-300x31.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-27-1024x106.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-27-768x79.png 768w\" sizes=\"(max-width: 1075px) 100vw, 1075px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Restore correct file permissions:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p>\n  sudo restorecon -Rv \/usr\/share\/nginx\/html\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1075\" height=\"113\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-28.png\" alt=\"  sudo restorecon -Rv \/usr\/share\/nginx\/html\n\" class=\"wp-image-16815\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-28.png 1075w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-28-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-28-1024x108.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16787-28-768x81.png 768w\" sizes=\"(max-width: 1075px) 100vw, 1075px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  SELinux can enhance the security of the server against unauthorized access and application exploits.\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16787-_b3d1xt7lg3oy\"><\/a><strong>Common LEMP Stack Commands on AlmaLinux 10<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Here is a list of some commonly used commands for LEMP Stack on AlmaLinux 10.\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><p><strong>Task<\/strong><br><\/p><\/th><th><p><strong>Command<\/strong>\n<\/p><\/th><\/tr><tr><th><p>\n  Install NGINX\n<\/p><\/th><th><p>\n  sudo dnf install nginx -y\n<\/p><\/th><\/tr><tr><th><p><a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-working-with-databases\/\">Install MySQL<\/a>\n<\/p><\/th><th><p>\n  sudo dnf install mysql-server -y\n<\/p><\/th><\/tr><tr><th><p>\n  Install PHP\n<\/p><\/th><th><p>\n  sudo dnf install php php-fpm php-mysqlnd -y\n<\/p><\/th><\/tr><tr><th><p>\n  Start NGINX\n<\/p><\/th><th><p>\n  sudo systemctl start nginx\n<\/p><\/th><\/tr><tr><th><p>\n  Start MySQL\n<\/p><\/th><th><p>\n  sudo systemctl start mysqld\n<\/p><\/th><\/tr><tr><th><p>\n  Start PHP-FPM\n<\/p><\/th><th><p>\n  sudo systemctl start php-fpm\n<\/p><\/th><\/tr><tr><th><p>\n  Test NGINX config\n<\/p><\/th><th><p>\n  sudo nginx -t\n<\/p><\/th><\/tr><tr><th><p>\n  Reload firewall\n<\/p><\/th><th><p>\n  sudo firewall-cmd &#8211;reload\n<\/p><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16787-_5fll67ao6vwd\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16787-_rdc1tas2gwan\"><\/a><strong>Security a LEMP Stack &#8211; Expert DevOps Practices<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_wnhi0e1emso7\"><\/a><strong>Keep Packages Updated<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Keep NGINX, PHP, and <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\">MySQL packages<\/a> up to date for security fixes.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_q1sl4j77386d\"><\/a><strong>Use HTTPS Encryption<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Secure, HTTPS connections with SSL Certificates via Let&#8217;s Encrypt.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_y7yhnpszaphz\"><\/a><strong>Disable Unused Services<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Use only services that are necessary for the applications.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_90htnvlca3dh\"><\/a><strong>Use Strong Database Passwords<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Use strong passwords and minimum privileges for MySQL accounts.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_voviuqgl0sm\"><\/a><strong>Enable Firewall Protection<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Use firewalld to permit only network traffic that is necessary.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16787-_no30bnee71pt\"><\/a><strong>Monitor Server Logs<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Check NGINX and <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-and-secure-mysql-mariadb-on-almalinux-10\/\">MySQL logs<\/a> periodically for anything amiss.\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16787-_2a8y2ey1u4m0\"><\/a><strong>Why the LEMP Stack Is Popular for Modern Web Hosting<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\n  The LEMP stack is widely used because it provides excellent performance, lower memory usage, and strong scalability.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  NGINX handles concurrent connections more efficiently than many traditional web servers, making it ideal for:\n<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>High-traffic websites<\/li>\n\n\n\n<li>WordPress hosting<\/li>\n\n\n\n<li>Cloud applications<\/li>\n\n\n\n<li>API servers<\/li>\n\n\n\n<li>eCommerce platforms<\/li>\n\n\n\n<li>VPS hosting<\/li>\n\n\n\n<li>Containerized applications<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Combined with PHP and MySQL, the LEMP stack offers a reliable foundation for modern web development.\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16787-_m58374w56d48\"><\/a><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Install the LEMP stack on AlmaLinux 10 by setting up NGINX, MySQL, and PHP to create a fast, secure, and production-ready Linux web hosting environment for WordPress, Laravel, and modern web applications. This setup is suitable for WordPress hosting, Laravel development, APIs, enterprise web applications, and cloud deployments.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n  Whether you are a beginner learning Linux server administration or an experienced DevOps engineer deploying production infrastructure, mastering the LEMP stack on AlmaLinux 10 is an essential skill for modern web hosting and application management.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Installing LEMP (LAMP) on AlmaLinux 10 is one of the best ways to install a high-performance web application on Linux. LEMP stack is the combination of Linux, NGINX, MySQL, and PHP in order to provide a fast, secure, and scalable web hosting environment for modern websites and applications. The AlmaLinux 10 distribution is gaining popularity [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":16817,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[1024,241,229,318],"class_list":["post-16787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-almalinux-10","tag-lemp-stack","tag-nginx","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide) - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide) - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-25T14:46:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-25T14:46:31+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"672\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide)\",\"datePublished\":\"2026-05-25T14:46:27+00:00\",\"dateModified\":\"2026-05-25T14:46:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\"},\"wordCount\":1330,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg\",\"keywords\":[\"AlmaLinux 10\",\"LEMP Stack\",\"Nginx\",\"PHP\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\",\"name\":\"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide) - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg\",\"datePublished\":\"2026-05-25T14:46:27+00:00\",\"dateModified\":\"2026-05-25T14:46:31+00:00\",\"description\":\"In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg\",\"width\":1200,\"height\":672,\"caption\":\"How to install lemp stack on AlmaLinux 10\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide) - Greenwebpage Community","description":"In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/","og_locale":"en_US","og_type":"article","og_title":"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide) - Greenwebpage Community","og_description":"In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/","og_site_name":"Greenwebpage Community","article_published_time":"2026-05-25T14:46:27+00:00","article_modified_time":"2026-05-25T14:46:31+00:00","og_image":[{"width":1200,"height":672,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide)","datePublished":"2026-05-25T14:46:27+00:00","dateModified":"2026-05-25T14:46:31+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/"},"wordCount":1330,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg","keywords":["AlmaLinux 10","LEMP Stack","Nginx","PHP"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/","name":"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide) - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg","datePublished":"2026-05-25T14:46:27+00:00","dateModified":"2026-05-25T14:46:31+00:00","description":"In this step-by-step tutorial, you will install the full LEMP stack on AlmaLinux 10 and configure the NGINX web server, MySQL database, PHP, PHP-FPM, and configure the firewall.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-install-lemp-stack-on-AlmaLinux-10.jpg","width":1200,"height":672,"caption":"How to install lemp stack on AlmaLinux 10"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-lemp-stack-on-almalinux-10-with-nginx-mysql-and-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install LEMP Stack on AlmaLinux 10 with NGINX, MySQL, and PHP (Complete Setup Guide)"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/16787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=16787"}],"version-history":[{"count":1,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/16787\/revisions"}],"predecessor-version":[{"id":16816,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/16787\/revisions\/16816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/16817"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=16787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=16787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=16787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}