{"id":1762,"date":"2015-09-05T02:53:58","date_gmt":"2015-09-05T07:53:58","guid":{"rendered":"http:\/\/www.migrate2cloud.com\/blog\/?p=1762"},"modified":"2016-03-21T02:41:45","modified_gmt":"2016-03-21T07:41:45","slug":"install-magento2-in-nginx-server-using-command-line","status":"publish","type":"post","link":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/","title":{"rendered":"Install Magento2 in Nginx Server Using Command Line"},"content":{"rendered":"<p><a href=\"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/Magento-2-Banner.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1768\" src=\"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/Magento-2-Banner-300x105.png\" alt=\"Magento-2-Banner\" width=\"300\" height=\"105\" srcset=\"https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/Magento-2-Banner-300x105.png 300w, https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/Magento-2-Banner.png 570w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Installing magento2 in Ubuntu 14.04 with Nginx web server.<\/p>\n<p><b>Prerequisites:<\/b><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><strong>1.PHP:<\/strong><\/p>\n<p><span style=\"font-weight: 400;\"> Version 5.5.X or more<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Required PHP extensions:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">PDO\/MySQL<\/span><\/p>\n<p><span style=\"font-weight: 400;\">mbstring<\/span><\/p>\n<p><span style=\"font-weight: 400;\">mcrypt<\/span><\/p>\n<p><span style=\"font-weight: 400;\">mhash<\/span><\/p>\n<p><span style=\"font-weight: 400;\">simplexml<\/span><\/p>\n<p><span style=\"font-weight: 400;\">curl<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ext-xsl<\/span><\/p>\n<p><span style=\"font-weight: 400;\">gd2, ImageMagick 6.3.7 (or later) or both<\/span><\/p>\n<p><span style=\"font-weight: 400;\">soap<\/span><\/p>\n<p><span style=\"font-weight: 400;\">intl<\/span><\/p>\n<p><strong>2.Mysql 5.6.X<\/strong><\/p>\n<p><strong>3.Nginx.<\/strong><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>Create basic nginx configuration file for magento2.<\/p>\n<p><span style=\"font-weight: 400;\"># vim \/etc\/nginx\/sites-available\/magantositename<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Add the following configuration files in nginx,<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">########################## <\/span><\/p>\n<p><span style=\"font-weight: 400;\">server {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">listen 80;<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"font-weight: 400;\">root <\/span><span style=\"font-weight: 400;\">\/var\/www\/magento2<\/span><span style=\"font-weight: 400;\">; #Use you mangeto2 location<\/span><\/p>\n<p><span style=\"font-weight: 400;\">index index.php index.html index.htm;<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"font-weight: 400;\">server_name<\/span><span style=\"font-weight: 400;\"> yuor_magento.siteurl<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">#location \/ {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">#try_files $uri $uri\/ \/index.php?q=$uri&amp;$args;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">#}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"line-height: 1.5;\">\u00a0 location \/setup {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0try_files $uri $uri\/ @setuphandler;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0}<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># Rewrite Setup&#8217;s Internal Requests<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0location @setuphandler {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rewrite \/setup \/setup\/index.php;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"line-height: 1.5;\">\u00a0 \u00a0location \/ {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0index index.php index.html;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0try_files $uri $uri\/ @handler;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>\u00a0 \u00a0# Rewrite Internal Requests<\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0location @handler {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rewrite \/ \/index.php;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"line-height: 1.5;\">\u00a0 \u00a0 location \/pub\/static {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0try_files $uri $uri\/ @static;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"line-height: 1.5;\">\u00a0 \u00a0 location @static {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rewrite ^\/pub\/static\/(.*)$ \/pub\/static.php?resource=$1? last;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>error_page 404 \/404.html;<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>error_page 500 502 503 504 \/50x.html;<\/p>\n<p><span style=\"font-weight: 400;\">location = \/50x.html {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">root \/usr\/share\/nginx\/www;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">}<\/span><\/p>\n<p>#pass the PHP scripts to f stcgi socket<\/p>\n<p><span style=\"font-weight: 400;\">location ~ \\.php$ {<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0try_files $uri =404;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_pass unix:\/var\/run\/php5-fpm.sock;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_index index.php;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0include fastcgi_params;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_read_timeout 900s;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">#Magento 2 Developer Mode<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_param MAGE_MODE &#8220;developer&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/span><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">}<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">#########################<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">create a symlink in \/etc\/nginx\/sites-enable\/<\/span><span style=\"font-weight: 400;\">magantositename<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"font-weight: 400;\"># ln -s \/etc\/nginx\/sites-available\/<\/span><span style=\"font-weight: 400;\">magantositename<\/span><span style=\"font-weight: 400;\"> \/etc\/nginx\/sites-enable\/<\/span><span style=\"font-weight: 400;\">magantositename<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Restart PHP handler php5-fpm and nginx<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"line-height: 1.5;\"># \u00a0service php5-fpm restart<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><span style=\"line-height: 1.5;\"># service nginx restart<\/span><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Create database and database user for magento2<\/span><\/p>\n<p><span style=\"font-weight: 400;\">login to mysql using root user and password:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># \u00a0mysql -u root -p<\/span><\/p>\n<p><span style=\"font-weight: 400;\">## mysql&gt; CREATE DATABASE &lt;<\/span><span style=\"font-weight: 400;\">magentodbname<\/span><span style=\"font-weight: 400;\">&gt;;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">## mysql&gt; \u00a0GRANT ALL ON &lt;<\/span><span style=\"font-weight: 400;\">magentodbname<\/span><span style=\"font-weight: 400;\">&gt;.* FROM <\/span><span style=\"font-weight: 400;\">magentodb<\/span><span style=\"font-weight: 400;\">@localhost IDENTIFIED BY &lt;<\/span><span style=\"font-weight: 400;\">magentodbpasswd<\/span><span style=\"font-weight: 400;\">&gt;;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Steps to install Magento2<\/strong><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>Change the directory where to download and install Magento2.<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong># cd \/var\/www\/<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>Download the magento2 zip file from github<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong># wget https:\/\/github.com\/magento\/magento2\/archive\/develop.zip<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong># unzip develop.zip<\/p>\n<p><span style=\"font-weight: 400;\"># mv magento2-develop magento2<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>Change the ownership to your webserver user name. Typically it is www-data<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong># chown -R www-data:www-data magento2<\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong># cd magento2<\/p>\n<p><span style=\"font-weight: 400;\">Change the permissions as follows,<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong># find . -type d -exec chmod 700 {} \\;<\/p>\n<p><span style=\"font-weight: 400;\"># find . -type f -exec chmod 600 {} \\; <\/span><\/p>\n<p><span style=\"font-weight: 400;\">make the file magento file executable \u00a0in the directory bin <\/span><\/p>\n<p><span style=\"font-weight: 400;\"># chmod +x bin\/magento<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Install magento using command line,<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># .\/bin\/magento setup:install &#8211;base-url &#8220;<\/span><span style=\"font-weight: 400;\">http:\/\/<\/span><span style=\"font-weight: 400;\">your_site_url<\/span><span style=\"font-weight: 400;\">\/<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;db-name &#8220;<\/span><span style=\"font-weight: 400;\">magentodbname<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;db-user &#8220;<\/span><span style=\"font-weight: 400;\">magentodb<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;db-password &#8220;<\/span><span style=\"font-weight: 400;\">magentodbpasswd<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;admin-firstname &#8220;<\/span><span style=\"font-weight: 400;\">yourname<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;admin-lastname &#8220;<\/span><span style=\"font-weight: 400;\">yourlastname<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;admin-email &#8220;<\/span><span style=\"font-weight: 400;\">your_email<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;admin-user &#8220;<\/span><span style=\"font-weight: 400;\">magenoadmi<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;admin-password &#8220;<\/span><span style=\"font-weight: 400;\">magentoadminpasswd<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;language &#8220;<\/span><span style=\"font-weight: 400;\">en_US<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;currency &#8220;<\/span><span style=\"font-weight: 400;\">USD<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;timezone &#8220;<\/span><span style=\"font-weight: 400;\">America\/Chicago<\/span><span style=\"font-weight: 400;\">&#8221; &#8211;use-sample-data &#8211;use-rewrites=1<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Here you will get your Language, Currency and Time zone using the following magento command.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Language: <\/span><\/p>\n<p><span style=\"font-weight: 400;\"># .\/bim\/magento info:language:list<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Currency:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># .\/bim\/magento info:currency:list<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Time Zone:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># .\/bim\/php magento info:timezone:list<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>Once the installation is completed you will get the SUCCESS message at the end of installation.<\/p>\n<p><span style=\"font-weight: 400;\">You can access the magento admin interface using the random \u00a0generated URL while installing Magento2.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can check the URL using magento command line.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># .\/bin\/magento info:adminuri<\/span><\/p>\n<p><strong><strong>\u00a0<\/strong><\/strong>You will get the admin URI as,<\/p>\n<p><span style=\"font-weight: 400;\">Admin URI: \/admin_8mdvzn<\/span><\/p>\n<p>You can \u00a0change the the Admin URI in &lt;your Magento install dir&gt;\/app\/etc\/env.php.<\/p>\n<p>Then you can access admin page as http:\/\/yuor_site_url\/admin_8mdvzn\/<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-admin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1769\" src=\"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-admin-300x177.png\" alt=\"magento-admin\" width=\"300\" height=\"177\" srcset=\"https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-admin-300x177.png 300w, https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-admin-1024x606.png 1024w, https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-admin.png 1361w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can access the magento2 home page at the installed URL as http:\/\/yuor_site_url.<\/p>\n<p>It will look as below,<\/p>\n<p><a href=\"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-2-home.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1774\" src=\"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-2-home-300x197.png\" alt=\"magento-2-home\" width=\"300\" height=\"197\" srcset=\"https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-2-home-300x197.png 300w, https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-2-home-1024x674.png 1024w, https:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/magento-2-home.png 1325w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: \u00a01.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. \u00a0Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3],"tags":[133,120,134],"class_list":["post-1762","post","type-post","status-publish","format-standard","hentry","category-cloud-computing","tag-cross-platform-software","tag-mysql-2","tag-php"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"DevOps Team\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Migrate to Cloud - we make the clouds rain\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud\" \/>\n\t\t<meta property=\"og:description\" content=\"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2015-09-05T07:53:58+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2016-03-21T07:41:45+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#blogposting\",\"name\":\"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud\",\"headline\":\"Install Magento2 in Nginx Server Using Command Line\",\"author\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/Magento-2-Banner-300x105.png\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#articleImage\"},\"datePublished\":\"2015-09-05T02:53:58-05:00\",\"dateModified\":\"2016-03-21T02:41:45-05:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#webpage\"},\"articleSection\":\"Cloud computing, Cross-platform software, Mysql, PHP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/#listItem\",\"name\":\"Cloud computing\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/#listItem\",\"position\":2,\"name\":\"Cloud computing\",\"item\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#listItem\",\"name\":\"Install Magento2 in Nginx Server Using Command Line\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#listItem\",\"position\":3,\"name\":\"Install Magento2 in Nginx Server Using Command Line\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/#listItem\",\"name\":\"Cloud computing\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\",\"name\":\"Migrate to Cloud\",\"description\":\"we make the clouds rain\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"DevOps Team\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/20b51e018d8f61e1739f60911fcf45cc9d09284569e448583a87f7fd0ac3d9dc?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"DevOps Team\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#webpage\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/\",\"name\":\"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud\",\"description\":\"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\\\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \\\/etc\\\/nginx\\\/sites-available\\\/magantositename Add the following configuration files in nginx,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/install-magento2-in-nginx-server-using-command-line\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2015-09-05T02:53:58-05:00\",\"dateModified\":\"2016-03-21T02:41:45-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/\",\"name\":\"Migrate to Cloud\",\"description\":\"we make the clouds rain\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud","description":"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,","canonical_url":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#blogposting","name":"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud","headline":"Install Magento2 in Nginx Server Using Command Line","author":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/www.migrate2cloud.com\/blog\/wp-content\/uploads\/2015\/09\/Magento-2-Banner-300x105.png","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#articleImage"},"datePublished":"2015-09-05T02:53:58-05:00","dateModified":"2016-03-21T02:41:45-05:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#webpage"},"isPartOf":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#webpage"},"articleSection":"Cloud computing, Cross-platform software, Mysql, PHP"},{"@type":"BreadcrumbList","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.migrate2cloud.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/#listItem","name":"Cloud computing"}},{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/#listItem","position":2,"name":"Cloud computing","item":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#listItem","name":"Install Magento2 in Nginx Server Using Command Line"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#listItem","position":3,"name":"Install Magento2 in Nginx Server Using Command Line","previousItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/#listItem","name":"Cloud computing"}}]},{"@type":"Organization","@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization","name":"Migrate to Cloud","description":"we make the clouds rain","url":"https:\/\/www.migrate2cloud.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin\/#author","url":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin\/","name":"DevOps Team","image":{"@type":"ImageObject","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/20b51e018d8f61e1739f60911fcf45cc9d09284569e448583a87f7fd0ac3d9dc?s=96&d=mm&r=g","width":96,"height":96,"caption":"DevOps Team"}},{"@type":"WebPage","@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#webpage","url":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/","name":"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud","description":"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/#breadcrumblist"},"author":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin\/#author"},"datePublished":"2015-09-05T02:53:58-05:00","dateModified":"2016-03-21T02:41:45-05:00"},{"@type":"WebSite","@id":"https:\/\/www.migrate2cloud.com\/blog\/#website","url":"https:\/\/www.migrate2cloud.com\/blog\/","name":"Migrate to Cloud","description":"we make the clouds rain","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Migrate to Cloud - we make the clouds rain","og:type":"article","og:title":"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud","og:description":"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,","og:url":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/","article:published_time":"2015-09-05T07:53:58+00:00","article:modified_time":"2016-03-21T07:41:45+00:00","twitter:card":"summary_large_image","twitter:title":"Install Magento2 in Nginx Server Using Command Line - Migrate to Cloud","twitter:description":"Installing magento2 in Ubuntu 14.04 with Nginx web server. Prerequisites: 1.PHP: Version 5.5.X or more Required PHP extensions: PDO\/MySQL mbstring mcrypt mhash simplexml curl ext-xsl gd2, ImageMagick 6.3.7 (or later) or both soap intl 2.Mysql 5.6.X 3.Nginx. Create basic nginx configuration file for magento2. # vim \/etc\/nginx\/sites-available\/magantositename Add the following configuration files in nginx,"},"aioseo_meta_data":{"post_id":"1762","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-12-27 09:33:08","updated":"2026-07-21 15:34:34","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.migrate2cloud.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/\" title=\"Cloud computing\">Cloud computing<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tInstall Magento2 in Nginx Server Using Command Line\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.migrate2cloud.com\/blog"},{"label":"Cloud computing","link":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/"},{"label":"Install Magento2 in Nginx Server Using Command Line","link":"https:\/\/www.migrate2cloud.com\/blog\/install-magento2-in-nginx-server-using-command-line\/"}],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/1762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/comments?post=1762"}],"version-history":[{"count":9,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/1762\/revisions"}],"predecessor-version":[{"id":2128,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/1762\/revisions\/2128"}],"wp:attachment":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/media?parent=1762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/categories?post=1762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/tags?post=1762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}