{"id":7928,"date":"2020-03-23T16:03:45","date_gmt":"2020-03-23T08:03:45","guid":{"rendered":"http:\/\/rmohan.com\/?p=7928"},"modified":"2020-03-23T16:03:48","modified_gmt":"2020-03-23T08:03:48","slug":"build-lamp-linux-apache-mysql-php-environment-under-centos-8-1","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7928","title":{"rendered":"Build LAMP (Linux + Apache + MySQL + PHP) environment under CentOS 8.1"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>LAMP is an acronym for Linux, Apache, MySQL, and PHP, and is a popular free and open source stack used by webmasters and developers to test and host dynamic websites.<br>\nThe LAMP server comes with 4 core components: Apache web server, MySQL or MariaDB database, and PHP (a popular scripting language for creating dynamic web pages).<br>\nCommon LAMP architecture platform! LAMP is the most popular combination in the world, of course, there is also Nginx, which is LNMP: LAMP is more secure than NGINX, <br>\nbut Nginx is more powerful than Apache in handling high concurrency. In this article, you will learn Install LAMP server on CentOS 8 Linux distribution.<\/p>\n\n\n\n<p>Step 1: Update CentOS 8 software package<br>\nIt is recommended that it is usually a good practice to update packages before starting the installation. So log in to your server and run the following command.<\/p>\n\n\n\n<p>dnf update<\/p>\n\n\n\n<p>dnf install httpd httpd-tools<\/p>\n\n\n\n<p>systemctl enable httpd<\/p>\n\n\n\n<p>systemctl start httpd<\/p>\n\n\n\n<p>systemctl status httpd<\/p>\n\n\n\n<p>httpd -v<\/p>\n\n\n\n<p>rpm -qi httpd<\/p>\n\n\n\n<p>centos8 with mariaDB<\/p>\n\n\n\n<p>dnf install mariadb-server mariadb -y<\/p>\n\n\n\n<p>systemctl start mariadb<\/p>\n\n\n\n<p>systemctl enable mariadb <\/p>\n\n\n\n<p>mysql_secure_installation<\/p>\n\n\n\n<p>dnf install https:\/\/dl.Fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm<\/p>\n\n\n\n<p>dnf install dnf-utils http:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm<\/p>\n\n\n\n<p>dnf module list php<\/p>\n\n\n\n<p>dnf module reset php<\/p>\n\n\n\n<p>dnf module enable php:remi-7.4<\/p>\n\n\n\n<p>dnf install php php-opcache php-gd php-curl php-mysqlnd<\/p>\n\n\n\n<p>dnf install php php-opcache php-gd php-curl php-mysqlnd<\/p>\n\n\n\n<p>php -v<\/p>\n\n\n\n<p>systemctl start php-fpm<br>\nsystemctl enable php-fpm<br>\nsystemctl status php-fpm<\/p>\n\n\n\n<p>setsebool -P httpd_execmem 1<\/p>\n\n\n\n<p>systemctl restart httpd<\/p>\n","protected":false},"excerpt":{"rendered":"\n<\/p>\n<p>LAMP is an acronym for Linux, Apache, MySQL, and PHP, and is a popular free and open source stack used by webmasters and developers to test and host dynamic websites. The LAMP server comes with 4 core components: Apache web server, MySQL or MariaDB database, and PHP (a popular scripting language for creating [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[99],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7928"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7928"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7928\/revisions"}],"predecessor-version":[{"id":7929,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7928\/revisions\/7929"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}