{"id":7790,"date":"2020-03-05T18:01:16","date_gmt":"2020-03-05T15:01:16","guid":{"rendered":"http:\/\/unihost.com\/help\/?p=7790"},"modified":"2023-01-19T14:00:07","modified_gmt":"2023-01-19T11:00:07","slug":"how-to-install-apache-mariadb-php-lamp-on-centos-8","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/","title":{"rendered":"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?LAMP.png\" alt=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 1\" width=\"702\" height=\"369\" \/ title=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 1\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and host dynamic websites.<!--more--><\/span><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">In this tutorial we will show you how to install LAMP Stack on CentOS 8.<\/span><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Installing Apache<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Apache is available in the default CentOS repositories.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf install httpd<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Enable and start the Apache service.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl enable httpd<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl start httpd<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Open your web browser and go to your server. http:\/\/<span style=\"color: #ff0000;\">server-ip<\/span>\/ you will see something like this.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?DM_050320_H4kNBNOA.png\" alt=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 2\" width=\"961\" height=\"921\" \/ title=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 2\"><\/span><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Install MariaDB<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">MariaDB is a pretty good database manager. It is a MySQL fork and therefore compatible with it. It is one of the open-source values. Install MariaDB on CentOS 8 with the command.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf install mariadb-server<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Enable and start MariaDB server.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl start mariadb<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl enable mariadb<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now it is necessary to define a password for the root user. In addition to this, the installation must be secured.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># mysql_secure_installation<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">In order to log into MariaDB to secure it, we'll need the current<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">password for the root user. If you've just installed MariaDB, and<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">you haven't set the root password yet, the password will be blank,<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">so you should just press enter here.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Enter current password for root (enter for none): <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">OK, successfully used password, moving on...<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Setting the root password ensures that nobody can log into the MariaDB<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">root user without the proper authorisation.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Set root password? [Y\/n] <span style=\"color: #ff0000;\">Y<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">New password: <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Re-enter new password: <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Password updated successfully!<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Reloading privilege tables..<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">... Success!<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, a MariaDB installation has an anonymous user, allowing anyone<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">to log into MariaDB without having to have a user account created for<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">them. This is intended only for testing, and to make the installation<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">go a bit smoother. You should remove them before moving into a<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">production environment.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Remove anonymous users? [Y\/n] <span style=\"color: #ff0000;\">Y<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">... Success!<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Normally, root should only be allowed to connect from 'localhost'. This<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ensures that someone cannot guess at the root password from the network.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Disallow root login remotely? [Y\/n] <span style=\"color: #ff0000;\">Y<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">... Success!<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, MariaDB comes with a database named 'test' that anyone can<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">access. This is also intended only for testing, and should be removed<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">before moving into a production environment.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Remove test database and access to it? [Y\/n] <span style=\"color: #ff0000;\">Y<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">- Dropping test database...<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">... Success!<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">- Removing privileges on test database...<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">... Success!<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Reloading the privilege tables will ensure that all changes made so far<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">will take effect immediately.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Reload privilege tables now? [Y\/n] <span style=\"color: #ff0000;\">Y<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">... Success!<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Cleaning up...<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">All done! If you've completed all of the above steps, your MariaDB<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">installation should now be secure.<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Thanks for using MariaDB!<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">When you\u2019re finished, log in to the MariaDB console.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># mysql -u root -p<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Create a new database.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">MariaDB [(none)]&gt; CREATE DATABASE <span style=\"color: #ff0000;\">database_name<\/span>;<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Create a new user and grant them full privileges on the custom database.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON <span style=\"color: #ff0000;\">database_name<\/span>.* TO '<span style=\"color: #ff0000;\">db_user<\/span>'@'localhost' IDENTIFIED BY '<span style=\"color: #ff0000;\">password<\/span>';<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Flush the privileges to ensure that they are saved and available in the current session:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/span><\/pre>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Install PHP<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, the Apache webserver supports the HTML language only. We will need to install the PHP.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf\u00a0install php php-common php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-gd php-mbstring php-xml<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?DM_050320_e9wOgl9V.png\" alt=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 3\" width=\"953\" height=\"832\" \/ title=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 3\"><\/span><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Creating Virtual Host\u00a0<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, Apache is configured to load all configuration files that ends with .conf from the \/etc\/httpd\/conf.d\/ directory.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># nano \/etc\/httpd\/conf.d\/<span style=\"color: #ff0000;\">example.com<\/span>.conf<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&lt;VirtualHost *:80&gt;<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ServerName <span style=\"color: #ff0000;\">example.com<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ServerAlias www.<span style=\"color: #ff0000;\">example.com<\/span><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">DocumentRoot \/var\/www\/<span style=\"color: #ff0000;\">example.com<\/span><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ErrorLog \/var\/log\/httpd\/<span style=\"color: #ff0000;\">example.com<\/span>-error.log<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">CustomLog \/var\/log\/httpd\/<span style=\"color: #ff0000;\">example.com<\/span>-access.log combined<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&lt;\/VirtualHost&gt;<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Create virtual host home folder.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># mkdir -p \/var\/www\/<span style=\"color: #ff0000;\">example.com<\/span><\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Apache should be made the owner of that folder.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># chown -R apache: \/var\/www\/<span style=\"color: #ff0000;\">example.com<\/span><\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">To test the Apache configuration, run the following command.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># httpd -t<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Syntax OK<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Restart Apache service.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl restart httpd<\/span><\/pre>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Testing PHP Information<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">To test PHP with the web server, you\u2019ll have to create a phpinfo file to the document root directory.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># echo \"&lt;?php phpinfo();\" &gt; \/var\/www\/<span style=\"color: #ff0000;\">example.com<\/span>\/index.php<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now we can test our webserver. Go to your browser and access your server hostname. You should see your server\u2019s PHP information.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?DM_050320_iUiEMoXL.png\" alt=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 4\" width=\"946\" height=\"820\" \/ title=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Image 4\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">This means PHP scripts can run properly with Apache web server. You have successfully install LAMP.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and host dynamic websites.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[123,58,558,472,143],"class_list":["post-7790","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers","tag-apache","tag-centos","tag-lamp","tag-mariadb","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-05T15:01:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-19T11:00:07+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/unihost.com\/help\/wp-content\/uploads\/LAMP.png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8\",\"datePublished\":\"2020-03-05T15:01:16+00:00\",\"dateModified\":\"2023-01-19T11:00:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\"},\"wordCount\":313,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/unihost.com\/help\/wp-content\/uploads\/LAMP.png\",\"keywords\":[\"Apache\",\"CentOS\",\"LAMP\",\"mariadb\",\"PHP\"],\"articleSection\":[\"02. Dedicated servers\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\",\"url\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\",\"name\":\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/unihost.com\/help\/wp-content\/uploads\/LAMP.png\",\"datePublished\":\"2020-03-05T15:01:16+00:00\",\"dateModified\":\"2023-01-19T11:00:07+00:00\",\"description\":\"LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?.\/LAMP.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?.\/LAMP.png\",\"width\":702,\"height\":369},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Unihost.FAQ","description":"LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and","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:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/","og_locale":"en_US","og_type":"article","og_title":"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Unihost.FAQ","og_description":"LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and","og_url":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2020-03-05T15:01:16+00:00","article_modified_time":"2023-01-19T11:00:07+00:00","og_image":[{"url":"http:\/\/unihost.com\/help\/wp-content\/uploads\/LAMP.png","type":"","width":"","height":""}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8","datePublished":"2020-03-05T15:01:16+00:00","dateModified":"2023-01-19T11:00:07+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/"},"wordCount":313,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"image":{"@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage"},"thumbnailUrl":"http:\/\/unihost.com\/help\/wp-content\/uploads\/LAMP.png","keywords":["Apache","CentOS","LAMP","mariadb","PHP"],"articleSection":["02. Dedicated servers"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/","url":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/","name":"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8 - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage"},"image":{"@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage"},"thumbnailUrl":"http:\/\/unihost.com\/help\/wp-content\/uploads\/LAMP.png","datePublished":"2020-03-05T15:01:16+00:00","dateModified":"2023-01-19T11:00:07+00:00","description":"LAMP\u00a0stack is the combination of\u00a0Linux,\u00a0Apache web server,\u00a0MySQL\/MariaDB,\u00a0PHP. LAMP stack is used to deploy web-based applications and","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#primaryimage","url":"https:\/\/unihost.com\/help\/minio.php?.\/LAMP.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?.\/LAMP.png","width":702,"height":369},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/how-to-install-apache-mariadb-php-lamp-on-centos-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"How To Install Apache, MariaDB, PHP (LAMP) On CentOS 8"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/7790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=7790"}],"version-history":[{"count":7,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/7790\/revisions"}],"predecessor-version":[{"id":11483,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/7790\/revisions\/11483"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=7790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=7790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=7790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}