{"id":4109,"date":"2014-07-29T12:56:53","date_gmt":"2014-07-29T17:56:53","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=4109"},"modified":"2022-06-03T03:46:49","modified_gmt":"2022-06-03T08:46:49","slug":"how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/","title":{"rendered":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS"},"content":{"rendered":"
<\/div>

\"Nginx-logo\"The following article will walk you through the steps on how to install LEMP (Linux, Nginx, MariaDB & PHP-FPM)<\/strong> on one of our CentOS 7<\/strong> Linux Virtual Servers<\/strong><\/a>.<\/p>\n

If instead, you are looking for how to set-up LAMP<\/strong>, then please refer to our guide on how to install LAMP (Linux Apache, MariaDB & PHP)<\/a> on a CentOS 7 VPS<\/a><\/strong><\/p>\n

What is LEMP?<\/strong><\/p>\n

A LEMP<\/strong> stack is a synonym of LEMP<\/strong> server or LEMP<\/strong> web server. It refers to a set-up which includes Linux<\/b>, Nginx<\/strong>, MariaDB (MySQL)<\/strong> and PHP<\/strong>.<\/p>\n

<\/p>\n

UPDATE THE SYSTEM<\/b><\/h3>\n

As usual, SSH<\/code> to your Linux VPS<\/a>, initiate a screen<\/code> session and make sure your CentOS 7<\/strong> is fully up-to-date by running the following commands:<\/p>\n

## screen -U -S lemp-centos7\n## yum update<\/pre>\n

INSTALL MARIA DB (MYSQL)<\/b><\/h3>\n

MariaDB<\/strong> is a drop-in replacement for MySQL<\/strong> and is the default database server used in CentOS 7 (RHEL7)<\/strong>. Proceed with installing it using yum<\/code> as in:<\/p>\n

## yum install mariadb mariadb-server mysql<\/pre>\n

Next, open \/etc\/my.cnf.d\/server.cnf<\/code> using your favorite text editor and add bind-address = 127.0.0.1<\/code> within the [mysqld]<\/code> block. For example:<\/p>\n

## vim \/etc\/my.cnf.d\/server.cnf\n\n[mysqld]\n#log-bin=mysql-bin\n#binlog_format=mixed\nbind-address = 127.0.0.1<\/pre>\n

This will bind MariaDB to listen on localhost only<\/strong>, which is considered to be a good security practice. OK, now restart the MariaDB database server and enable it to start on system start-up using:<\/p>\n

## systemctl restart mariadb\n## systemctl status mariadb\n## systemctl enable mariadb<\/pre>\n

Optionally, you can run the mysql_secure_installation<\/code> post-installation script to improve MariaDB (MySQL) installation security<\/strong>. For example:<\/p>\n

## mysql_secure_installation\n\nEnter current password for root (enter for none): ENTER\nSet root password? [Y\/n] Y\nRemove anonymous users? [Y\/n] Y\nDisallow root login remotely? [Y\/n] Y\nRemove test database and access to it? [Y\/n] Y\nReload privilege tables now? [Y\/n] Y<\/pre>\n

INSTALL NGINX HTTP SERVER<\/b><\/h3>\n

Nginx<\/code> is not yet available in CentOS 7<\/strong> official repositories at the time of writing this article. So, to be easily installed and managed using yum<\/code>, we can use the repository for the latest stable version of Nginx for CentOS 7<\/a>.<\/p>\n

For example:<\/p>\n

## rpm -Uvh http:\/\/nginx.org\/packages\/centos\/7\/noarch\/RPMS\/nginx-release-centos-7-0.el7.ngx.noarch.rpm\n## yum install nginx<\/pre>\n

Once it’s installed, run the following command to find out the number of CPUs available in your SSD VPS:<\/p>\n

## grep -c processor \/proc\/cpuinfo\n2<\/pre>\n

This number should represent the number of nginx<\/code> processes set in Nginx main configuration file in \/etc\/nginx\/nginx.conf<\/code>.<\/p>\n

## vim \/etc\/nginx\/nginx.conf\n...\nworker_processes  2;\n<\/pre>\n

Stop Apache if it\u2019s running on the system using the following command:<\/p>\n

## [[ $(pgrep httpd) ]] && ( systemctl stop httpd; systemctl disable httpd )<\/pre>\n

and test, start and add Nginx to system\u2019s start-up using:<\/p>\n

## nginx -t\n## systemctl restart nginx\n## systemctl enable nginx<\/pre>\n

Navigate to http:\/\/server_ip<\/span> and you should get something like:<\/p>\n

\"nginx-default\"<\/p>\n

This means that your have Nginx up and running just fine.<\/p>\n

INSTALL PHP-FPM<\/b><\/h3>\n

We are going to run PHP as FastCGI using PHP-FPM<\/strong>, so install PHP support using yum<\/code>:<\/p>\n

## yum install php-fpm php-mysql<\/pre>\n

also, you may want to install some other PHP extensions<\/strong> required by your applications. Here is the list:<\/p>\n

php-bcmath          : A module for PHP applications for using the bcmath library\nphp-cli             : Command-line interface for PHP\nphp-common          : Common files for PHP\nphp-dba             : A database abstraction layer module for PHP applications\nphp-devel           : Files needed for building PHP extensions\nphp-embedded        : PHP library for embedding in applications\nphp-enchant         : Enchant spelling extension for PHP applications\nphp-fpm             : PHP FastCGI Process Manager\nphp-gd              : A module for PHP applications for using the gd graphics library\nphp-intl            : Internationalization extension for PHP applications\nphp-ldap            : A module for PHP applications that use LDAP\nphp-mbstring        : A module for PHP applications which need multi-byte string handling\nphp-mysql           : A module for PHP applications that use MySQL databases\nphp-mysqlnd         : A module for PHP applications that use MySQL databases\nphp-odbc            : A module for PHP applications that use ODBC databases\nphp-pdo             : A database access abstraction module for PHP applications\nphp-pear.noarch     : PHP Extension and Application Repository framework\nphp-pecl-memcache   : Extension to work with the Memcached caching daemon\nphp-pgsql           : A PostgreSQL database module for PHP\nphp-process         : Modules for PHP script using system process interfaces\nphp-pspell          : A module for PHP applications for using pspell interfaces\nphp-recode          : A module for PHP applications for using the recode library\nphp-snmp            : A module for PHP applications that query SNMP-managed devices\nphp-soap            : A module for PHP applications that use the SOAP protocol\nphp-xml             : A module for PHP applications which use XML\nphp-xmlrpc          : A module for PHP applications which use the XML-RPC protocol<\/pre>\n

Edit PHP main configuration file in \/etc\/php.ini<\/code> and set the following:<\/p>\n

## vim \/etc\/php.ini\n\ndate.timezone = America\/New_York\nmemory_limit = 64M\nexpose_php = Off<\/pre>\n

Also, edit \/etc\/php-fpm.d\/www.conf<\/code> and change the user and group the fpm pool will be running under to nginx<\/code>:<\/p>\n

## vim +\/^user \/etc\/php-fpm.d\/www.conf\n\nuser = nginx\ngroup = nginx<\/pre>\n

set-up log directory ownership:<\/p>\n

## chown nginx:root -R \/var\/log\/php-fpm\/<\/pre>\n

start and add the PHP server to the system\u2019s start-up using systemctl<\/code><\/p>\n

## systemctl restart php-fpm\n## systemctl enable php-fpm<\/pre>\n

SET-UP NGINX VHOST<\/b><\/h3>\n

Let’s say you have a domain mydomain.com<\/code> and you like to use it to host a PHP based web application in \/srv\/www\/mydomain.com.com<\/code> like WordPress, Joomla, Laravel etc. To set-up Nginx serve requests for mydomain.com<\/code>, and serve the PHP scripts in \/srv\/www\/mydomain.com.com<\/code> you would have to create a server block in \/etc\/nginx\/conf.d\/mydomain.com.conf<\/code> which would look something like:<\/p>\n

## vim \/etc\/nginx\/conf.d\/mydomain.com.conf\n\nserver {\n    server_name mydomain.com;\n    listen 80;\n    root \/srv\/www\/mydomain.com;\n    access_log \/var\/log\/nginx\/mydomain.com-access.log;\n    error_log \/var\/log\/nginx\/mydomain.com-error.log;\n    index index.php;\n\n    location \/ {\n        try_files  $uri $uri\/ \/index.php?$args;\n    }\n\n    location ~* \\.(jpg|jpeg|gif|css|png|js|ico|html)$ {\n        access_log off;\n        expires max;\n    }\n    location ~ \/\\.ht {\n        deny  all;\n    }\n    location ~ \\.php {\n        try_files $uri = 404;\n        fastcgi_pass 127.0.0.1:9000;\n        fastcgi_index index.php;\n        include \/etc\/nginx\/fastcgi_params;\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    }\n}<\/pre>\n

test and re-start Nginx using:<\/p>\n

## nginx -t\n## systemctl restart nginx<\/pre>\n

Optionally, create a test info.php<\/code> script using the following command:<\/p>\n

## mkdir -p \/srv\/www\/mydomain.com\n## echo -e \"<?php\\n\\tphpinfo();\" > \/srv\/www\/mydomain.com\/info.php\n## chown nginx: -R \/srv\/www\/<\/pre>\n

and try to access it in your browser at http:\/\/mydomain.com\/info.php<\/span><\/p>\n


\n

Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install LEMP for you<\/strong>. They are available 24×7 and will take care of your request immediately. You can also try reading our guide on How to install LEMP (Linux, Nginx, MySQL & PHP-FPM) on a Debian 8 VPS<\/a>.<\/p>\n

PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"

The following article will walk you through the steps on how to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":1139,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1702,13,1712,1707],"tags":[34,310,177,296,49,51],"yoast_head":"\nHow to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting<\/title>\n<meta name=\"description\" content=\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-29T17:56:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:46:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"621\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\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:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS\",\"datePublished\":\"2014-07-29T17:56:53+00:00\",\"dateModified\":\"2022-06-03T08:46:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\"},\"wordCount\":595,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png\",\"keywords\":[\"centos\",\"lemp\",\"linux vps\",\"mariadb\",\"nginx\",\"php-fpm\"],\"articleSection\":[\"CentOS\",\"Databases\",\"Tutorials\",\"Web Frameworks\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\",\"name\":\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png\",\"datePublished\":\"2014-07-29T17:56:53+00:00\",\"dateModified\":\"2022-06-03T08:46:49+00:00\",\"description\":\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png\",\"width\":\"621\",\"height\":\"350\",\"caption\":\"Nginx-logo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting","description":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting","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:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/","og_locale":"en_US","og_type":"article","og_title":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting","og_description":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2014-07-29T17:56:53+00:00","article_modified_time":"2022-06-03T08:46:49+00:00","og_image":[{"width":"621","height":"350","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png","type":"image\/png"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS","datePublished":"2014-07-29T17:56:53+00:00","dateModified":"2022-06-03T08:46:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/"},"wordCount":595,"commentCount":5,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png","keywords":["centos","lemp","linux vps","mariadb","nginx","php-fpm"],"articleSection":["CentOS","Databases","Tutorials","Web Frameworks","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/","name":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png","datePublished":"2014-07-29T17:56:53+00:00","dateModified":"2022-06-03T08:46:49+00:00","description":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/05\/Nginx-logo.png","width":"621","height":"350","caption":"Nginx-logo"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to install LEMP (Linux, Nginx, MariaDB & PHP-FPM) on a CentOS 7 VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/4109"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=4109"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/4109\/revisions"}],"predecessor-version":[{"id":36664,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/4109\/revisions\/36664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/1139"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=4109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=4109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=4109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}