{"id":392,"date":"2016-08-11T09:49:21","date_gmt":"2016-08-11T06:49:21","guid":{"rendered":"https:\/\/community.virtono.com\/?p=392"},"modified":"2023-06-21T09:48:26","modified_gmt":"2023-06-21T06:48:26","slug":"how-to-install-lamp-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/","title":{"rendered":"HOW TO INSTALL LAMP ON CENTOS 7"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>The LAMP stack (Linux, Apache, MySQL, PHP) is a group of open source software that is typically installed together to enable a server to host dynamic PHP websites and web apps.<\/p>\n<p>This guide includes the steps to set up a LAMP stack on Centos 7, if you want more information on <a href=\"https:\/\/virtono.com\/community\/knowledgebase\/lamp-technology\/\" target=\"_blank\" rel=\"noopener\">LAMP <\/a>click <a href=\"https:\/\/virtono.com\/community\/knowledgebase\/lamp-technology\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<h4><\/h4>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/#Notice\" title=\"Notice:\">Notice:<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/#INSTALL_APACHE_WEB_SERVER\" title=\"INSTALL APACHE WEB SERVER\">INSTALL APACHE WEB SERVER<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/#INSTALL_PHP5\" title=\"INSTALL PHP5\">INSTALL PHP5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/#INSTALL_MARIADB_MYSQL_SERVER\" title=\"INSTALL MARIADB MYSQL SERVER\">INSTALL MARIADB MYSQL SERVER<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/#MARIADB_INITIAL_CONFIGURATION\" title=\"MARIADB INITIAL CONFIGURATION\">MARIADB INITIAL CONFIGURATION<\/a><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"Notice\"><\/span>Notice:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>There is a new player on the table, LAMP which originally stood for Linux, Apache, MySQL and PHP, has now been going through some change, that being the new player <a href=\"http:\/\/en.wikipedia.org\/wiki\/Mariadb\" target=\"_blank\" rel=\"noopener\">Maria DB<\/a>, a replacement for original MySQL.<br \/>\nMariaDB has almost all the features of MySQL and features library binary equivalency and exact matching with MySQL APIs and commands. It means if an app is able to run with MySQL and it also is able to on MariaDB without any glitch. I will not explain what is\u00a0<a href=\"https:\/\/virtono.com\/community\/knowledgebase\/how-mysql-and-php-work-together\/\" target=\"_blank\" rel=\"noopener\">Apache and PHP<\/a>\u00a0as I\u2019ve explained before and I believe you already knew what it is.<\/p>\n<p>If you want more info on the similarities and differences on MariaDB and MySQL, here is the article:<\/p>\n<p><a href=\"https:\/\/mariadb.com\/kb\/en\/mariadb\/mariadb-vs-mysql-features\/\" target=\"_blank\" rel=\"noopener\">https:\/\/mariadb.com\/kb\/en\/mariadb\/mariadb-vs-mysql-features\/<\/a><\/p>\n<p>Let\u2019s start with the step by step tutorial:<\/p>\n<h2><span class=\"ez-toc-section\" id=\"INSTALL_APACHE_WEB_SERVER\"><\/span>INSTALL APACHE WEB SERVER<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Step 1\u00a0\u2013 Login to your server via Terminal.<\/p>\n<p>Step 2\u00a0\u2013 Now issue command below to install Apache 2.4 on your CentOS 7 server:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">yum install httpd -y<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As you can see the command is still the same.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"394\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/1-15\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-4.png?fit=419%2C79&amp;ssl=1\" data-orig-size=\"419,79\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-4.png?fit=419%2C79&amp;ssl=1\" class=\"wp-image-394 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/1-4-300x57.png?resize=358%2C68&#038;ssl=1\" alt=\"1\" width=\"358\" height=\"68\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-4.png?resize=300%2C57&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/1-4.png?w=419&amp;ssl=1 419w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/p>\n<p>And when the process finished, you\u2019ll see something like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"395\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/2-14\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-4.png?fit=526%2C166&amp;ssl=1\" data-orig-size=\"526,166\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-4.png?fit=526%2C166&amp;ssl=1\" class=\"wp-image-395 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/2-4-300x95.png?resize=328%2C104&#038;ssl=1\" alt=\"2\" width=\"328\" height=\"104\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-4.png?resize=300%2C95&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/2-4.png?w=526&amp;ssl=1 526w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/p>\n<p>Step 3\u00a0\u2013 Now you have Apache 2.4 installed which you can then start the service by typing command below:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">systemctl start httpd.service<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"396\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/3-13\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-4.png?fit=405%2C69&amp;ssl=1\" data-orig-size=\"405,69\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-4.png?fit=405%2C69&amp;ssl=1\" class=\" wp-image-396 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/3-4-300x51.png?resize=359%2C61&#038;ssl=1\" alt=\"3\" width=\"359\" height=\"61\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-4.png?resize=300%2C51&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/3-4.png?w=405&amp;ssl=1 405w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/p>\n<p>Step 4\u00a0\u2013 You can verify that Apache is really running by opening your favorite web browser and access your vps via its IP address:<\/p>\n<p>http:\/\/xxx.xxx.xxx.xxx<\/p>\n<p>and you\u2019ll see default Apache welcome page.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"397\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/4-11\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-3.png?fit=620%2C284&amp;ssl=1\" data-orig-size=\"620,284\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-3.png?fit=620%2C284&amp;ssl=1\" class=\"wp-image-397 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/4-3-300x137.png?resize=353%2C161&#038;ssl=1\" alt=\"4\" width=\"353\" height=\"161\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-3.png?resize=300%2C137&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/4-3.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/p>\n<p>In current example I\u2019ve installed Apache v2.4.6.<\/p>\n<p>or, you can directly issue this command:<\/p>\n<p>systemctl status httpd.service<\/p>\n<p>you\u2019ll see something like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"398\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/5-9\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-3.png?fit=620%2C320&amp;ssl=1\" data-orig-size=\"620,320\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-3.png?fit=620%2C320&amp;ssl=1\" class=\" wp-image-398 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/5-3-300x155.png?resize=368%2C190&#038;ssl=1\" alt=\"5\" width=\"368\" height=\"190\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-3.png?resize=300%2C155&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/5-3.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 368px) 100vw, 368px\" \/><\/p>\n<p>Enable Apache to automatically run every time your server reboot:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">systemctl enable httpd.service<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"INSTALL_PHP5\"><\/span>INSTALL PHP5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Step 5\u00a0\u2013 Now, it is time to install PHP5. Default command is:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">yum install php -y<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>That\u2019 really is a simple command but since we will install MySQL then we\u2019ll need PHP MySQL modules plus any other PHP5 modules you website \/ app may need it. You can view all available modules using this command:<\/p>\n<p>You can simply use command below that includes common PHP5 modules most websites can run with it.<\/p>\n<p>yum install php php-common php-cli php-devel php-gd php-imap php-intl php-mysql php-process php-xml php-xmlrpc php-zts -y<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"399\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/6-9\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-3.png?fit=549%2C220&amp;ssl=1\" data-orig-size=\"549,220\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-3.png?fit=549%2C220&amp;ssl=1\" class=\" wp-image-399 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/6-3-300x120.png?resize=353%2C141&#038;ssl=1\" alt=\"6\" width=\"353\" height=\"141\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-3.png?resize=300%2C120&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/6-3.png?w=549&amp;ssl=1 549w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/p>\n<p>And once done, you\u2019ll see something like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"400\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/7-8\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-3.png?fit=620%2C294&amp;ssl=1\" data-orig-size=\"620,294\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-3.png?fit=620%2C294&amp;ssl=1\" class=\"wp-image-400 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/7-3-300x142.png?resize=355%2C168&#038;ssl=1\" alt=\"7\" width=\"355\" height=\"168\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-3.png?resize=300%2C142&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-3.png?resize=520%2C245&amp;ssl=1 520w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-3.png?resize=720%2C340&amp;ssl=1 720w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/7-3.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/p>\n<h2><\/h2>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"INSTALL_MARIADB_MYSQL_SERVER\"><\/span>INSTALL MARIADB MYSQL SERVER<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Step 6\u00a0\u2013 Once again we\u2019ll make us of yum package manager:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">yum install mariadb-server mariadb -y<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"402\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/9-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-2.png?fit=445%2C88&amp;ssl=1\" data-orig-size=\"445,88\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-2.png?fit=445%2C88&amp;ssl=1\" class=\"wp-image-402 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/9-2-300x59.png?resize=351%2C69&#038;ssl=1\" alt=\"9\" width=\"351\" height=\"69\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-2.png?resize=300%2C59&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/9-2.png?w=445&amp;ssl=1 445w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/p>\n<p>and once done you\u2019ll see something like this:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"403\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/10-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-2.png?fit=620%2C327&amp;ssl=1\" data-orig-size=\"620,327\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-2.png?fit=620%2C327&amp;ssl=1\" class=\"wp-image-403 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/10-2-300x158.png?resize=380%2C200&#038;ssl=1\" alt=\"10\" width=\"380\" height=\"200\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-2.png?resize=300%2C158&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/10-2.png?w=620&amp;ssl=1 620w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<p>Step 7\u00a0\u2013 Now you can start MariaDB server for the very first time using this simple systemctl command :<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">systemctl start mariadb.service<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"404\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/11-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-2.png?fit=550%2C399&amp;ssl=1\" data-orig-size=\"550,399\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"11\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-2.png?fit=550%2C399&amp;ssl=1\" class=\" wp-image-404 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/11-2-300x218.png?resize=333%2C242&#038;ssl=1\" alt=\"11\" width=\"333\" height=\"242\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-2.png?resize=300%2C218&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/11-2.png?w=550&amp;ssl=1 550w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"MARIADB_INITIAL_CONFIGURATION\"><\/span>MARIADB INITIAL CONFIGURATION<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Step 8\u00a0\u2013 So its service is now running but there is one thing you should do immediately: configuring MariaDB setup for the very first time like setting up your mysql root password. Issue this command:<\/p>\n<table width=\"605\">\n<tbody>\n<tr>\n<td>1<\/td>\n<td width=\"573\">mysql_secure_installation<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then you\u2019ll see a series of question, just answer it accordingly. The main important part is to define your root password while everything else is just up to you or you can simply hit the \u201cENTER\u201d key through each prompt to accept the default values.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"405\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lamp-on-centos-7\/attachment\/12-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-2.png?fit=583%2C1009&amp;ssl=1\" data-orig-size=\"583,1009\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"12\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-2.png?fit=583%2C1009&amp;ssl=1\" class=\"wp-image-405 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/12-2-173x300.png?resize=409%2C709&#038;ssl=1\" alt=\"12\" width=\"409\" height=\"709\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-2.png?resize=173%2C300&amp;ssl=1 173w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/12-2.png?w=583&amp;ssl=1 583w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/p>\n<p>You, my friend, are done!, Congrats!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The LAMP stack (Linux, Apache, MySQL, PHP) is a group of open source software that is typically installed together to enable a server to host dynamic PHP websites and web apps. This guide includes the steps to set up a LAMP stack on Centos 7, if you want more<\/p>\n","protected":false},"author":3,"featured_media":393,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":["post-392","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/pic2.jpg?fit=1366%2C768&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-6k","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3966,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-prestashop-on-centos-7\/","url_meta":{"origin":392,"position":0},"title":"How to Install PrestaShop on CentOS 7","author":"George B.","date":"September 29, 2023","format":false,"excerpt":"PrestaShop is a widely used, open-source e-commerce platform. With its flexibility, scalability, and rich feature set, it has been adopted by many online retailers around the world. For those using the CentOS 7 operating system, this guide will take you step by step through the process of installing PrestaShop on\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-PrestaShop-on-CentOS.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1036,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/installing-lamp-linux-apache-mysql-php-stack-on-debian-7-server\/","url_meta":{"origin":392,"position":1},"title":"INSTALLING LAMP (LINUX, APACHE, MYSQL &amp; PHP) STACK ON DEBIAN 7 SERVER","author":"Daniel Draga","date":"September 25, 2017","format":false,"excerpt":"LAMP STANDS FOR: L:Linux A:Apache M:MySQL P:PHP What is LAMP? LAMP is a shorthand term for a\u00a0web application platform\u00a0consisting of Linux, Apache, MySQL and one of Perl or PHP. Lamp is an\u00a0\u00a0OPENSOURCE Together, these open source tools provide a world-class platform for deploying web applications TECHNOLOGIES USED IN LAMP: For\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2961,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-on-centos-8\/","url_meta":{"origin":392,"position":2},"title":"How to Install WordPress on CentOS 8","author":"George B.","date":"August 4, 2022","format":false,"excerpt":"What is WordPress? WordPress is a free and open-source platform for building websites. On a more technical level, WordPress is a PHP-based content management system (CMS) that uses a MySQL database. WordPress is the most user-friendly and powerful blogging and website builder available today. Important note: According to WPVALID the\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/Looking-for-a-WordPress-Developer-1042x665-1.jpeg?fit=1042%2C665&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/Looking-for-a-WordPress-Developer-1042x665-1.jpeg?fit=1042%2C665&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/Looking-for-a-WordPress-Developer-1042x665-1.jpeg?fit=1042%2C665&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/Looking-for-a-WordPress-Developer-1042x665-1.jpeg?fit=1042%2C665&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":235,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/lamp-technology\/","url_meta":{"origin":392,"position":3},"title":"LAMP TECHNOLOGY","author":"Daniel Draga","date":"July 30, 2016","format":false,"excerpt":"LAMP STANDS FOR: L:Linux A:Apache M:MySQL P:PHP What is LAMP? LAMP is a shorthand term for a web application platform consisting of Linux, Apache, MySQL and one of Perl or PHP. Lamp is an\u00a0 OPENSOURCE Together, these open source tools provide a world-class platform for deploying web applications TECHNOLOGIES USED\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2976,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/setup-linux-apache-mysql-phplamp-ubuntu-20-04\/","url_meta":{"origin":392,"position":4},"title":"Setup Linux Apache MySQL PHP(LAMP) &#8211; Ubuntu 20.04","author":"George B.","date":"August 5, 2022","format":false,"excerpt":"What is LAMP? LAMP (Linux, Apache, MySQL, PHP\/Perl\/Python) is an acronym that refers to one of the most widely used software stacks for many of the web's most popular applications. Step 1 - Update\/Upgrade your package index sudo apt update sudo apt upgrade Step 2 - Install Apache apt-get install\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":376,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/set-up-a-lamp-stack-on-ubuntu-14-04\/","url_meta":{"origin":392,"position":5},"title":"Set up a LAMP stack on Ubuntu 14.04","author":"Daniel Draga","date":"August 11, 2016","format":false,"excerpt":"Introduction The LAMP stack (Linux, Apache, MySQL, PHP) is a group of open source software that is typically installed together to enable a server to host dynamic PHP websites and web apps. This guide includes the steps to set up a LAMP stack on Ubuntu 14.04, if you want more\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/pic.jpg?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/pic.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/pic.jpg?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/pic.jpg?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/pic.jpg?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=392"}],"version-history":[{"count":3,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":3552,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/392\/revisions\/3552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/393"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}