How to Install and Configure Magento on Ubuntu 16.04

March 16, 2017 26.3k views
Apache MySQL LAMP Stack Ubuntu 16.04

I installed everything in this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

and i want to install Magento on my droplet which as title indicate is Ubuntu 16.04

but i got stuck on this tutorial in php settings section: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-magento-on-ubuntu-14-04

so if anyone knows how to do it ... please help me

1 comment
  • 7  mysql_secure_installation
    8  mysql -u root -p
    9  cd /var/www/public_html/
    

    12 wget http://www.magentocommerce.com/downloads/assets/2.2.2/magento-2.2.2.tar.gz
    15 tar xzvf Magento-CE-2.2.2sampledata-2017-12-11-09-37-31.tar.gz
    18 chown -R www-data:www-data /var/www/public_html/
    22 apt-get update
    25 apt-get install php7.0-dom
    29 apt-get install php7.0-soap
    30 /etc/init.d/apache2 reload
    31 apt-get install php7.0-intl
    32 apt-get install php7.0-mbstring
    33 vi /etc/php/7.0/apache2/php.ini
    34 apt-get install php7.0-zip
    35 /etc/init.d/apache2 reload

6 Answers

I'm pretty sure Ubuntu 16.04 comes with PHP 7.0, so that means you have to look for the configuration file in /etc/php/7.0/apache2/php.ini

And then change the following from php5 to:

sudo apt-get update
sudo apt-get install php7.0-curl php7.0-gd php7.0-mcrypt

That should cover everything, but if you run into problem, just write back - please include error messages or where you got stuck.

  • @sa1eh
    By the way, it's important that you use Magento version 2+, since you're using PHP 7.0
    It is possible to run the latest Magento 1.9 on PHP 7, but it requires some tweaks.

Great it's really working but I'm having some problems with downloading the Magento using wget

wget http://www.magentocommerce.com/tech-resources/downloads/assets/2.1.5/magento-2.1.5.tar.gz

Hi ,

Could you please any one help me, how to exclude the var directory from magento nfs share.

Hi,

For example, test directory contains two directory A and B and test.php file. So we have to exclude B directory but i need all the files from test directoryexcept B directory.

Kindly help me anyone, how to use nfs.

I have added my writeup on github, i am now running magento 2.2 on ubuntu 16.04 LAMP stack.
https://github.com/eplt/magento2-digitalocean-ubuntu16.04

Hi there Please be careful with your Droplet memory specification before installing Magento on your vps. I have blown away my server because of not enough memory. Install Magento on at leat 4 GB server. In addition to that, be carefuı with the cron jobs. You should configure those also. Don't be such a novice like me.

Have another answer? Share your knowledge.