cancel
Showing results for 
Search instead for 
Did you mean: 

Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

SOLVED

Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello friends,

I am pleased to be here with experts.

For development purpose I was on shared hosting with GoDaddy where I installed Magento 2.2.2 without any major errors.

Concerning for security and speed, I decided to move to cloud hosting where initially I am new to cloud hosting and using Digital Ocean as my first ever cloud hosting provider.

 

I installed LAMP on Ubuntu 16 at Digital Ocean via SSH/CLI.

Extracted the Magento2-CE zipped folder in the root directory. 

 

Here I am facing problems when "Step 1: Readiness Check" started:

STEP1: PHP Extensions Check

-- 4 missing PHP extensions.PHP Extension curl.

PHP Extension intl.

PHP Extension soap.

PHP Extension zip.

 

To resolve, I removed ; (colon) from every line

- PHP Extension.intl (line #899)
- PHP Extension.soap(line #921)
- and PHP Extension.xsl(line #926)

  but couldn't find PHP Extension zip anywhere.

 

Second problem is with "File Permission Check" which I couldn't rectify at my own and require your support.

 

For your reference I am sending you the screenshot where initially I am having the problem. Please help.

Thanks in advance.

Readiness Check.png

 

13 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

You need to give write permission to few directories like , static,var,generated etc.

 

assuming Magento is installed in /var/www/html/magento2:

 

Run below command to give permission  :

cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; && find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} \; && chmod u+x bin/magento

 

Here is the full guideline to resolve this issue - http://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/rc_perms.html

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

Thanks a lot for the guidance.

Permission part is resolved after changing the permission.

Thanks a lot again.

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Happy to help !! Keep helping !! Smiley Happy

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

I again need your help.

I installed M2 on Ubunto 16 at Digital Ocean. After installation, I tried to access the admin page which is not accessible anyway and showing "This site can't be reached". www.Flazon.com refuses to connect.

I tried to resolve it and at several places came to know that it could be a rewrite issue with apache 2.

I will be thankful to you or anyone in this forum, if could help me solving this issue step-by-step.

Thanks again in advance.

 

www flazon com admin page.png

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Sure , if its confirm that you have issue with the url mode rewrite , for magento 2 yes url rewrite mode needs to be enabled !!

 

so here is the reference link how to enable url rewrite of apache2 - https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite

 

Also if admin panel is not open them please check and confirm you have .htaccess file in root folder ?

 

i have seen your website css and js are not loading for that run below command :

 

php bin/magento setup:static-content:deploy

 

Also after that please clear cache by running command php bin/magento cache:clean and php bin/magento cache:flush

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Thanks my friend again for your prompt reply. I honestly appreciate your support.

I tried to modify apache2 configuration file 000-default.conf but unfortunately couldn't succeed.

I couldn't find myself comfortable in changing configuration of apache2 and .htaccess.

 

If possible for you can you please explain this:

   <Directory /var/www/html/example.com/public_html>

        Require all granted

   </Directory>

 

<VirtualHost *:80>

  ServerName flazon.com

  ServerAlias www.flazon.com

  ServerAdmin webmaster@localhost

  DocumentRoot /var/www/html/

 

  ErrorLog /var/www/html/logs/error.log

  CustomLog /var/www/html/logs/access.log combined

</VirtualHost>

 

As my M2 root files are under /var/www/html,  IS IT SIMILAR TO:

   <Directory /var/www/html/>

        Require all granted

   </Directory>

 

<VirtualHost *:80>

  ServerName flazon.com

  ServerAlias www.flazon.com

  ServerAdmin webmaster@localhost

  DocumentRoot /var/www/html/

 

  ErrorLog /var/www/html/logs/error.log (Do I need to create a log folder to hold error.log?)

  CustomLog /var/www/html/logs/access.log combined (what is custom log?)

</VirtualHost>

 

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

For apache i think its perfect , for this server related issue better to ask your hosting provider. they might help you in this case.

 

Regarding .htaccess file you can download .htaccess file from here - https://github.com/magento/magento2/blob/2.0.4/.htaccess

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

Thanks a lot for your support and suggestions.

Finally with your help, I reached to the goal.

M2 is installed successfully at my domain on Digital Ocean.

 

Can you please help me a bit in installing modules which we have purchased from Webkul (multi-vendor and SSO (single signon))?

 

Hope to have your further support.

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Sure !! you can install module/extension by following step by step guideline of webkul , they provide documentation for how to install extension for the same.

 

you can install extension by putting all the files of extensions in app/code directory of Magento2!!

 

after putting that you need to run below commands sequencelly

.

1) php bin/magento setup:upgrade

2) php bin/magento setup:di:compile

3) php bin/magento setup:static-content:deploy -f

4) php bin/magento cache:clean

5) php bin/magento cache:flush

 

then after check your extension will be installed!!

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello

Thanks again

1. I tried the same procedure after buying Webkul's multivendor and SSO modules but none at that time worked. I followed their documentation, searched a lot the ways to integrate both the modules but nothing succeed. Finally I was bound to take support of Webku to install those modules and they did the same.

 

Now as the support period is over, they are not going to help me out. I am bound to do it at my own. 

-------------------------------------------------

2. Now after copying Webkul modules, when I am trying to run 'php bin/magento setup:upgrade' from the 'root' too which is generating an error "After Could not open input file: bin/magento" which is most probably due to making some changes at the time of assigning groups and users privilege permission. Now I am unable to understand if I can undo it?

 

Please guide me if I can do so?

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

Hope you are doing fine.

With your help I have installed M2 on Digital Ocean cloud server. The initial setup worked fine without any problem. 

But when turn for installation of Webkul module came, I followed your instructions, copied Webkul module's contents in app/code and ran upgrade, compile, deploy, cache clean and flush commands but after that the homepage and admin login page stopped working with the same error as below.

 

ERROR AS FOLLOWS:

-------------------------------

This page isn’t working

www.flazon.com is currently unable to handle this request.

HTTP ERROR 500
 
Can you please tell what reason could be there for this?

View solution in original post

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

14 REPLIES 14

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

You need to give write permission to few directories like , static,var,generated etc.

 

assuming Magento is installed in /var/www/html/magento2:

 

Run below command to give permission  :

cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; && find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} \; && chmod u+x bin/magento

 

Here is the full guideline to resolve this issue - http://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/rc_perms.html

if issue solved,Click Kudos & Accept as Solution

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

Thanks a lot for the guidance.

Permission part is resolved after changing the permission.

Thanks a lot again.

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Happy to help !! Keep helping !! Smiley Happy

if issue solved,Click Kudos & Accept as Solution

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

I again need your help.

I installed M2 on Ubunto 16 at Digital Ocean. After installation, I tried to access the admin page which is not accessible anyway and showing "This site can't be reached". www.Flazon.com refuses to connect.

I tried to resolve it and at several places came to know that it could be a rewrite issue with apache 2.

I will be thankful to you or anyone in this forum, if could help me solving this issue step-by-step.

Thanks again in advance.

 

www flazon com admin page.png

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Sure , if its confirm that you have issue with the url mode rewrite , for magento 2 yes url rewrite mode needs to be enabled !!

 

so here is the reference link how to enable url rewrite of apache2 - https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite

 

Also if admin panel is not open them please check and confirm you have .htaccess file in root folder ?

 

i have seen your website css and js are not loading for that run below command :

 

php bin/magento setup:static-content:deploy

 

Also after that please clear cache by running command php bin/magento cache:clean and php bin/magento cache:flush

if issue solved,Click Kudos & Accept as Solution

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Thanks my friend again for your prompt reply. I honestly appreciate your support.

I tried to modify apache2 configuration file 000-default.conf but unfortunately couldn't succeed.

I couldn't find myself comfortable in changing configuration of apache2 and .htaccess.

 

If possible for you can you please explain this:

   <Directory /var/www/html/example.com/public_html>

        Require all granted

   </Directory>

 

<VirtualHost *:80>

  ServerName flazon.com

  ServerAlias www.flazon.com

  ServerAdmin webmaster@localhost

  DocumentRoot /var/www/html/

 

  ErrorLog /var/www/html/logs/error.log

  CustomLog /var/www/html/logs/access.log combined

</VirtualHost>

 

As my M2 root files are under /var/www/html,  IS IT SIMILAR TO:

   <Directory /var/www/html/>

        Require all granted

   </Directory>

 

<VirtualHost *:80>

  ServerName flazon.com

  ServerAlias www.flazon.com

  ServerAdmin webmaster@localhost

  DocumentRoot /var/www/html/

 

  ErrorLog /var/www/html/logs/error.log (Do I need to create a log folder to hold error.log?)

  CustomLog /var/www/html/logs/access.log combined (what is custom log?)

</VirtualHost>

 

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

For apache i think its perfect , for this server related issue better to ask your hosting provider. they might help you in this case.

 

Regarding .htaccess file you can download .htaccess file from here - https://github.com/magento/magento2/blob/2.0.4/.htaccess

if issue solved,Click Kudos & Accept as Solution

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Hello Manthan

Thanks a lot for your support and suggestions.

Finally with your help, I reached to the goal.

M2 is installed successfully at my domain on Digital Ocean.

 

Can you please help me a bit in installing modules which we have purchased from Webkul (multi-vendor and SSO (single signon))?

 

Hope to have your further support.

Re: Error during installation of Magento 2 on Digital Ocean, Ubuntu 16

Sure !! you can install module/extension by following step by step guideline of webkul , they provide documentation for how to install extension for the same.

 

you can install extension by putting all the files of extensions in app/code directory of Magento2!!

 

after putting that you need to run below commands sequencelly

.

1) php bin/magento setup:upgrade

2) php bin/magento setup:di:compile

3) php bin/magento setup:static-content:deploy -f

4) php bin/magento cache:clean

5) php bin/magento cache:flush

 

then after check your extension will be installed!!

if issue solved,Click Kudos & Accept as Solution