{"id":29873,"date":"2019-02-28T14:11:49","date_gmt":"2019-02-28T20:11:49","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=29873"},"modified":"2022-12-09T05:42:58","modified_gmt":"2022-12-09T11:42:58","slug":"how-to-install-lemp-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/","title":{"rendered":"How to Install LEMP on Ubuntu 18.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-29880\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg\" alt=\"Install LEMP on Ubuntu 18.04\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>The LEMP stack is a web development platform for hosting static and dynamic websites. It is a combination of free and open-source software including Linux, Nginx, MySQL, and PHP. It is an alternative to the highly popular LAMP stack, the only difference being having Nginx as a web server instead of Apache.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f212929549b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><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><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f212929549b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#Requirements\" >Requirements:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#1-Log-in-via-SSH-and-Update-the-System\" >1. Log in via SSH and Update the System<\/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.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#2-Install-Nginx\" >2. Install Nginx<\/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.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#3-Install-MySQL\" >3. Install MySQL<\/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.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#4-Install-PHP\" >4. Install PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#5-Configure-Nginx-for-PHP\" >5. Configure Nginx for PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#6-Test-PHP\" >6. Test PHP<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Requirements\"><\/span><strong>Requirements:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>For the purposes of this tutorial, we will be using an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 18.04 VPS<\/a>.<\/li>\n<li>Full SSH root access or a user with sudo privileges is also required.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"1-Log-in-via-SSH-and-Update-the-System\"><\/span>1. Log in via SSH and Update the System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Log in to your Ubuntu 18.04 VPS with SSH as root or a user with sudo privileges:<\/p>\n<pre>ssh root@IP_Address -p Port_number<\/pre>\n<p>You can check whether you have the proper Ubuntu version installed on your server with the following command:<\/p>\n<pre>$ lsb_release -a<\/pre>\n<p>You should get this output:<\/p>\n<pre>Distributor ID: Ubuntu\r\nDescription:    Ubuntu 18.04.1 LTS\r\nRelease:        18.04\r\nCodename:       bionic<\/pre>\n<p>Once you are logged in, run the following command to update all installed packages to the latest available version:<\/p>\n<pre>$ sudo apt-get update &amp;&amp; apt upgrade<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"2-Install-Nginx\"><\/span>2. Install Nginx<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To install Nginx on your Ubuntu 18.04 server, you need to execute the following command:<\/p>\n<pre>$ sudo apt-get install nginx<\/pre>\n<p>After the installation is completed, start Nginx and enable it to start automatically after a reboot with these two commands:<\/p>\n<pre>$ sudo systemctl start nginx\r\n$ sudo systemctl enable nginx<\/pre>\n<p>To check and verify whether Nginx is currently running on your server, execute the following command:<\/p>\n<pre>$ sudo systemctl status nginx<\/pre>\n<p>Output:<\/p>\n<pre><span style=\"color: #339966;\">\u25cf<\/span> nginx.service - A high performance web server and a reverse proxy server\r\n   Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\r\n   Active: <span style=\"color: #339966;\">active (running)<\/span>\r\n     Docs: man:nginx(8)\r\n  Process: 2133 ExecStart=\/usr\/sbin\/nginx -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\r\n  Process: 2121 ExecStartPre=\/usr\/sbin\/nginx -t -q -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\r\n Main PID: 2135 (nginx)\r\n    Tasks: 3 (limit: 2292)\r\n   CGroup: \/system.slice\/nginx.service\r\n           \u251c\u25002135 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\r\n           \u251c\u25002139 nginx: worker process\r\n           \u2514\u25002140 nginx: worker process<\/pre>\n<p>Also, you can verify that Nginx is running by opening a web browser and visiting your server IP address (http:\/\/server_ip). You should get the Nginx welcome page &#8211; it should look similar to the one below:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-29875 size-full aligncenter\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Nginx.png\" alt=\"How to Install LEMP on Ubuntu 18.04\" width=\"864\" height=\"294\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Nginx.png 864w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Nginx-150x51.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Nginx-300x102.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Nginx-768x261.png 768w\" sizes=\"(max-width: 864px) 100vw, 864px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"3-Install-MySQL\"><\/span>3. Install MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Next, we need to install the <a href=\"https:\/\/www.rosehosting.com\/mysql-hosting.html\">MySQL<\/a>\u00a0server. The following command will install the latest MySQL 5.7 server from the official Ubuntu repositories:<\/p>\n<pre>$ sudo apt install mysql-server<\/pre>\n<p>When the installation is complete, run the following commands to start and enable the MySQL service :<\/p>\n<pre>$ sudo systemctl start mysql\r\n$ sudo systemctl enable mysql<\/pre>\n<p>We can check to see if the MySQL service is running:<\/p>\n<pre>$ sudo service mysql status<\/pre>\n<p>If running, you will see a green Active status, like this:<\/p>\n<pre><span style=\"color: #339966;\">\u25cf<\/span> mysql.service - MySQL Community Server\r\n   Loaded: loaded (\/lib\/systemd\/system\/mysql.service; enabled; vendor preset: enabled)\r\n   Active: <span style=\"color: #339966;\">active (running)<\/span>\r\n Main PID: 2538 (mysqld)\r\n    Tasks: 27 (limit: 2292)\r\n   CGroup: \/system.slice\/mysql.service\r\n           \u2514\u25002538 \/usr\/sbin\/mysqld --daemonize --pid-file=\/run\/mysqld\/mysqld.pid<\/pre>\n<p>Once the installation is complete, issue the following command to secure your installation:<\/p>\n<pre>$ sudo mysql_secure_installation<\/pre>\n<p>Then, answer every prompt with Yes to improve the security of your MySQL server.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"4-Install-PHP\"><\/span>4. Install PHP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The last step of our LEMP stack setup is the PHP installation. Currently, the default PHP version available from the official Ubuntu repository is PHP 7.2.<\/p>\n<p>Unlike Apache, Nginx does not contain native PHP processing. For that, we have to install PHP-FPM (FastCGI Process Manager). FPM is an alternative PHP FastCGI implementation with some additional features useful for sites with high load.<\/p>\n<pre>$ sudo apt-get install php-fpm php-mysql<\/pre>\n<p>To verify if PHP has been properly installed, you can run the following command:<\/p>\n<pre>$ php -v<\/pre>\n<p>Output:<\/p>\n<pre>PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb  8 2019 14:54:22) ( NTS )\r\nCopyright (c) 1997-2018 The PHP Group\r\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\r\n    with Zend OPcache v7.2.15-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"5-Configure-Nginx-for-PHP\"><\/span>5. Configure Nginx for PHP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The next step you that need to complete is to modify the Nginx configuration file. The command below does exactly that:<\/p>\n<pre>$ cd \/etc\/nginx\/sites-available\/\r\n$ sudo nano \/etc\/nginx\/sites-available\/your_domain.com.conf<\/pre>\n<p>Now that you have a new default file opened, paste the following content:<\/p>\n<pre>server {\r\nlisten 80;\r\nroot \/var\/www\/html;\r\nindex index.php index.html index.htm index.nginx-debian.html;\r\nserver_name your_domain.com;\r\n\r\nlocation \/ {\r\ntry_files $uri $uri\/ =404;\r\n}\r\n\r\nlocation ~ \\.php$ {\r\ninclude snippets\/fastcgi-php.conf;\r\nfastcgi_pass unix:\/var\/run\/php\/php7.2-fpm.sock;\r\n}\r\n\r\nlocation ~ \/\\.ht {\r\ndeny all;\r\n}\r\n}\r\n<\/pre>\n<p>To enable the server configuration that we just created, run the following command:<\/p>\n<pre>$ sudo ln -s \/etc\/nginx\/sites-available\/your_domain.com.conf \/etc\/nginx\/sites-enabled\/your_domain.com.conf<\/pre>\n<p>Now, check the config file to make sure that there are no syntax errors. Any errors could crash the web server on restart.<\/p>\n<pre>$ sudo nginx -t<\/pre>\n<p>Output:<\/p>\n<pre>nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n<p>If there are no errors, you can reload the Nginx config.<\/p>\n<pre>$ sudo service nginx reload<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"6-Test-PHP\"><\/span>6. Test PHP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To see if PHP is working correctly on Ubuntu 18.04, let\u2019s a create a new PHP file called <code>info.php<\/code> in the document root directory. By default, this is located in <code>\/var\/www\/html\/<\/code>.<\/p>\n<pre> $ sudo nano \/var\/www\/html\/info.php<\/pre>\n<p>Paste the following into the file:<\/p>\n<pre>&lt;?php\r\nphpinfo();\r\n?&gt;<\/pre>\n<p>Restart Nginx for the changes to take effect:<\/p>\n<pre>$ sudo systemctl restart nginx<\/pre>\n<p>Now, open your preferred web browser and navigate to <code>http:\/\/your_server_ip_address\/info.php<\/code> . You will be welcomed by a web page similar to the one below:<\/p>\n<figure id=\"attachment_29876\" aria-describedby=\"caption-attachment-29876\" style=\"width: 799px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"size-full wp-image-29876\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/PHP.png\" alt=\"How to Install LEMP on Ubuntu 18.04\" width=\"809\" height=\"775\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/PHP.png 809w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/PHP-150x144.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/PHP-300x287.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/PHP-768x736.png 768w\" sizes=\"(max-width: 809px) 100vw, 809px\" \/><figcaption id=\"caption-attachment-29876\" class=\"wp-caption-text\">How to Install LEMP on Ubuntu 18.04<\/figcaption><\/figure>\n<p>That\u2019s it &#8211; you have successfully installed the <strong>LEMP <\/strong>stack on your <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 18.04 VPS<\/a>.<\/p>\n<p>Of course, you don\u2019t have to do any of this if you use one of our <a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install the LEMP stack for you. They are available 24\u00d77 and will take care of your request immediately. For more updates, you can also check our guide on <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-with-a-lemp-stack-on-ubuntu-18-04\/\">How to Install WordPress with a LEMP Stack on Ubuntu 18.04<\/a>.<\/p>\n<p><span style=\"color: #ff0000;\">PS.<\/span> If you liked this post, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The LEMP stack is a web development platform for hosting static and dynamic websites. It is a combination of free &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install LEMP on Ubuntu 18.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#more-29873\" aria-label=\"Read more about How to Install LEMP on Ubuntu 18.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":29880,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698,1707],"tags":[310,39,49,50,59],"class_list":["post-29873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","category-web-servers","tag-lemp","tag-mysql","tag-nginx","tag-php","tag-ubuntu","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install LEMP on Ubuntu 18.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install LEMP on Ubuntu 18.04 | 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-on-ubuntu-18-04\/\" \/>\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 on Ubuntu 18.04\" \/>\n<meta property=\"og:description\" content=\"How to Install LEMP on Ubuntu 18.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/\" \/>\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=\"2019-02-28T20:11:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-09T11:42:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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=\"5 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-on-ubuntu-18-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install LEMP on Ubuntu 18.04\",\"datePublished\":\"2019-02-28T20:11:49+00:00\",\"dateModified\":\"2022-12-09T11:42:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/\"},\"wordCount\":690,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/install-lemp-ubuntu18.jpg\",\"keywords\":[\"lemp\",\"mysql\",\"nginx\",\"php\",\"ubuntu\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/\",\"name\":\"How to Install LEMP on Ubuntu 18.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/install-lemp-ubuntu18.jpg\",\"datePublished\":\"2019-02-28T20:11:49+00:00\",\"dateModified\":\"2022-12-09T11:42:58+00:00\",\"description\":\"How to Install LEMP on Ubuntu 18.04 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/install-lemp-ubuntu18.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/install-lemp-ubuntu18.jpg\",\"width\":742,\"height\":372,\"caption\":\"Install LEMP on Ubuntu 18.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-lemp-on-ubuntu-18-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install LEMP on Ubuntu 18.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"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\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"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\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?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 Premium plugin. -->","yoast_head_json":{"title":"How to Install LEMP on Ubuntu 18.04 | RoseHosting","description":"How to Install LEMP on Ubuntu 18.04 | 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-on-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install LEMP on Ubuntu 18.04","og_description":"How to Install LEMP on Ubuntu 18.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2019-02-28T20:11:49+00:00","article_modified_time":"2022-12-09T11:42:58+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install LEMP on Ubuntu 18.04","datePublished":"2019-02-28T20:11:49+00:00","dateModified":"2022-12-09T11:42:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/"},"wordCount":690,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg","keywords":["lemp","mysql","nginx","php","ubuntu"],"articleSection":["Tutorials","Ubuntu","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/","name":"How to Install LEMP on Ubuntu 18.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg","datePublished":"2019-02-28T20:11:49+00:00","dateModified":"2022-12-09T11:42:58+00:00","description":"How to Install LEMP on Ubuntu 18.04 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-lemp-ubuntu18.jpg","width":742,"height":372,"caption":"Install LEMP on Ubuntu 18.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lemp-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install LEMP on Ubuntu 18.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","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":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"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\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?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\/29873","targetHints":{"allow":["GET"]}}],"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=29873"}],"version-history":[{"count":7,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29873\/revisions"}],"predecessor-version":[{"id":43939,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29873\/revisions\/43939"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/29880"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=29873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=29873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=29873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}