{"id":264,"date":"2017-11-08T07:00:46","date_gmt":"2017-11-08T13:00:46","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=264"},"modified":"2020-08-02T11:49:56","modified_gmt":"2020-08-02T16:49:56","slug":"how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/","title":{"rendered":"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7"},"content":{"rendered":"<div id=\"linux-2378075191\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7.<br \/>\nA LEMP stack is a synonym of LEMP server or LEMP web server. It refers to a set-up which includes Linux, Nginx, MySQL (MariaDB) and PHP.<\/p>\n<p><!--more--><\/p>\n<h2>1. Update the system<\/h2>\n<p>As usual before beginning a new installation on your VPS, update the system first:<\/p>\n<pre># yum update<\/pre>\n<h2>2. Install MariaDB(MySQL)<\/h2>\n<p>MariaDB is a drop-in replacement for MySQL and is the default database server used in CentOS 7 (RHEL7). Install it using yum like this:<\/p>\n<pre># yum -y install mariadb mariadb-server<\/pre>\n<p>To stop intruders from trying to access our MariaDB server while we&#8217;re setting it up, open the &#8220;\/etc\/my.cnf.d\/server.cnf&#8221; file for editing and add the &#8220;bind-address&#8221; directive to have it listen only on the localhost IP address:<\/p>\n<pre># nano \/etc\/my.cnf.d\/server.cnf\r\n\r\n[mysqld]\r\nbind-address = 127.0.0.1\r\n<\/pre>\n<p>Now, restart the MariaDB server and enable it on startup with the following commands:<\/p>\n<pre># systemctl start mariadb\r\n# systemctl enable mariadb\r\n<\/pre>\n<p>You can also run the mysql_secure_installation script to improve MariaDB (MySQL) security:<\/p>\n<pre># mysql_secure_installation\r\n\r\nEnter current password for root (enter for none): ENTER\r\nSet root password? [Y\/n] Y\r\nRemove anonymous users? [Y\/n] Y\r\nDisallow root login remotely? [Y\/n] Y\r\nRemove test database and access to it? [Y\/n] Y\r\nReload privilege tables now? [Y\/n] Y<\/pre>\n<h2>3. Install Nginx<\/h2>\n<p>We are going to install Nginx as it is a key component of our LEMP stack and will serve our website to the users.<br \/>\nNginx is not available in the official CentOS repository so we need to install the EPEL repository first:<\/p>\n<pre># yum install epel-release<\/pre>\n<p>Type in the following command to install Nginx:<\/p>\n<pre># yum -y install nginx<\/pre>\n<p>Once Nginx is installed, run these two commands to start the web server and enable it on boot:<\/p>\n<pre># systemctl start nginx\r\n# systemctl enable nginx<\/pre>\n<p>Now, check if Nginx is running by executing this command:<\/p>\n<pre># systemctl status nginx<\/pre>\n<p>The output of the command above should be similar to this:<\/p>\n<pre>\u25cf nginx.service - The nginx HTTP and reverse proxy server\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: disabled)\r\n   Active: active (running)\r\n Main PID: 10092 (nginx)\r\n   CGroup: \/system.slice\/nginx.service\r\n           \u251c\u250010092 nginx: master process \/usr\/sbin\/nginx\r\n           \u251c\u250010093 nginx: worker process\r\n           \u2514\u250010094 nginx: worker process\r\n<\/pre>\n<p>You can also check if Nginx is running by going to http:\/\/YOUR_IP in your web browser.<\/p>\n<h2>4. Install PHP7.1-FPM<\/h2>\n<p>Now we are going to install PHP7.1-FPM as we will need it to process the PHP files our website contains.<br \/>\nBecause PHP-7.1 is not available in the official CentOS repository we need to install the Remi repository first:<\/p>\n<pre># wget http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm &amp;&amp; rpm -Uvh remi-release-7.rpm<\/pre>\n<p>The following command installs PHP7.1-FPM and enables the remi-safe repository which gives priority to the distribution and EPEL repository packages, meaning it won&#8217;t conflict with any of these packages if you upgrade your system:<\/p>\n<pre># yum --enablerepo=remi-safe -y install php71-php-fpm<\/pre>\n<p>Once PHP7.1-FPM is installed, run these commands to start PHP7.1-FPM and enable it on boot:<\/p>\n<pre># systemctl start php71-php-fpm\r\n# systemctl enable php71-php-fpm<\/pre>\n<p>Now, check if PHP7.1-FPM is running by executing this command:<\/p>\n<pre># systemctl status php71-php-fpm<\/pre>\n<p>The output of the command above should be similar to this:<\/p>\n<pre>\u25cf php71-php-fpm.service - The PHP FastCGI Process Manager\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/php71-php-fpm.service; enabled; vendor preset: disabled)\r\n   Active: active (running)\r\n Main PID: 10792 (php-fpm)\r\n   Status: \"Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req\/sec\"\r\n   CGroup: \/system.slice\/php71-php-fpm.service\r\n           \u251c\u250010792 php-fpm: master process (\/etc\/opt\/remi\/php71\/php-fpm.conf)\r\n           \u251c\u250010793 php-fpm: pool www\r\n           \u251c\u250010794 php-fpm: pool www\r\n           \u251c\u250010795 php-fpm: pool www\r\n           \u251c\u250010796 php-fpm: pool www\r\n           \u2514\u250010797 php-fpm: pool www\r\n<\/pre>\n<p>Note: The configuration files for the PHP-7.1 Remi repository package are located in the &#8220;\/etc\/opt\/remi\/php71&#8221; directory.<\/p>\n<p>Next, change the configuration of the default PHP7.1-FPM pool to listen on a unix socket and use Nginx&#8217;s user and group:<\/p>\n<pre># nano \/etc\/opt\/remi\/php71\/php-fpm.d\/www.conf\r\n\r\n; Unix user\/group of processes\r\n; Note: The user is mandatory. If the group is not set, the default user's group\r\n;       will be used.\r\n; RPM: apache user chosen to provide access to the same directories as httpd\r\nuser = nginx\r\n; RPM: Keep a group allowed to write in log dir.\r\ngroup = nginx\r\n\r\n; The address on which to accept FastCGI requests.\r\n; Valid syntaxes are:\r\n;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on\r\n;                            a specific port;\r\n;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on\r\n;                            a specific port;\r\n;   'port'                 - to listen on a TCP socket to all addresses\r\n;                            (IPv6 and IPv4-mapped) on a specific port;\r\n;   '\/path\/to\/unix\/socket' - to listen on a unix socket.\r\n; Note: This value is mandatory.\r\nlisten = \/run\/php\/php7.1-fpm.sock\r\n<\/pre>\n<p>Save the changes and restart the PHP7.1-FPM service:<\/p>\n<pre># systemctl restart php71-php-fpm<\/pre>\n<h2>5. Configuring Nginx<\/h2>\n<p>Now that you have everything up and running we will create a document root directory and a server block for our site in Nginx, start by typing in the following command:<\/p>\n<pre># mkdir -p \/var\/www\/example.com<\/pre>\n<p>We will create the Nginx server block for our domain and configure it to use PHP-7.1:<\/p>\n<pre># nano \/etc\/nginx\/conf.d\/example.com.conf\r\n\r\nserver {\r\n        listen 80;\r\n        \r\n        root \/var\/www\/example.com;\r\n\r\n        # Add index.php to the list if you are using PHP\r\n        index index.php index.html index.htm index.nginx-debian.html;\r\n\r\n        server_name example.com;\r\n\r\n        location \/ {\r\n                # First attempt to serve request as file, then\r\n                # as directory, then fall back to displaying a 404.\r\n                try_files $uri $uri\/ =404;\r\n        }\r\n\r\n        # pass the PHP scripts to FastCGI server using the \/run\/php\/php7.1-fpm.sock socket\r\n        #\r\n        location ~ \\.php$ {\r\n                include fastcgi.conf;\r\n                fastcgi_pass unix:\/run\/php\/php7.1-fpm.sock;\r\n        }\r\n\r\n        # deny access to .htaccess files, if Apache's document root\r\n        # concurs with nginx's one\r\n        #\r\n        location ~ \/\\.ht {\r\n                deny all;\r\n        }\r\n}\r\n<\/pre>\n<p>Save the changes and test the configuration:<\/p>\n<pre># nginx -t\r\n\r\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\r\n<\/pre>\n<p>If there are no errors copy your website&#8217;s contents to the &#8220;\/var\/www\/example.com&#8221; directory, change the owner of the directory and restart Nginx with the following commands:<\/p>\n<pre># chown -R nginx:nginx \/var\/www\/example.com\r\n# systemctl restart nginx\r\n<\/pre>\n<p>And now you should see your site up and running when you access http:\/\/example.com in your web browser.<br \/>\nNote: Remember to replace example.com with your own domain name.<\/p>\n<p>Of course, you don\u2019t have to install a LEMP Stack with PHP-7.1 on CentOS 7, if you use one of our <a href=\"https:\/\/linuxhostsupport.com\">Linux Support Services<\/a>, in which case you can simply ask our expert Linux admins to<strong> install LEMP with PHP-7.1 on a CentOS 7 server<\/strong> for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p><strong><span style=\"color: #ff0000;\">PS<\/span><\/strong><span style=\"color: #000000;\">.<\/span> If you liked this post on how to deploy a LEMP Stack with PHP-7.1 on CentOS 7, please share it with your friends on the social networks using the buttons below or simply leave a comment in the Comments Section below. Thanks<\/p><div id=\"linux-2559991358\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP stack is a synonym of LEMP server or LEMP web server. It refers to a set-up which includes Linux, Nginx, MySQL (MariaDB) and PHP.<\/p>\n","protected":false},"author":1,"featured_media":265,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[86,79,87],"class_list":["post-264","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-lemp","tag-linux-host-support","tag-php-7-1"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to deploy a LEMP Stack with PHP-7.1 on CentOS 7 | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7 | LinuxHostSupport\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-08T13:00:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-02T16:49:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2017\/11\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7\",\"datePublished\":\"2017-11-08T13:00:46+00:00\",\"dateModified\":\"2020-08-02T16:49:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/\"},\"wordCount\":669,\"commentCount\":8,\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png\",\"keywords\":[\"LEMP\",\"Linux host support\",\"php 7.1\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/\",\"name\":\"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7 | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png\",\"datePublished\":\"2017-11-08T13:00:46+00:00\",\"dateModified\":\"2020-08-02T16:49:56+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png\",\"contentUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png\",\"width\":1200,\"height\":600,\"caption\":\"How to deploy a LEMP Stack with PHP 7.1 on CentOS 7\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7 | LinuxHostSupport","description":"In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP","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:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7 | LinuxHostSupport","og_description":"In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP","og_url":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2017-11-08T13:00:46+00:00","article_modified_time":"2020-08-02T16:49:56+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2017\/11\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7","datePublished":"2017-11-08T13:00:46+00:00","dateModified":"2020-08-02T16:49:56+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/"},"wordCount":669,"commentCount":8,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2017\/11\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png","keywords":["LEMP","Linux host support","php 7.1"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/","url":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/","name":"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7 | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2017\/11\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png","datePublished":"2017-11-08T13:00:46+00:00","dateModified":"2020-08-02T16:49:56+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"In this tutorial we will walk you through the steps on how to deploy a LEMP (Linux, Nginx, MySQL and PHP-FPM) stack with PHP-7.1 on a CentOS 7. A LEMP","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2017\/11\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2017\/11\/How-to-deploy-a-LEMP-Stack-with-PHP-7.1-on-CentOS-7.png","width":1200,"height":600,"caption":"How to deploy a LEMP Stack with PHP 7.1 on CentOS 7"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-deploy-a-lemp-stack-with-php-7-1-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to deploy a LEMP Stack with PHP-7.1 on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":6,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/264\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/264\/revisions\/1230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/265"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}