ERPNext 4 Installation Problem


I have duplicated this problem several times, and hope you can help:

Fresh install of Centos 6.5 , 64 bit, Basic Server, on a VirtualBox VM hosted on OSX.

I issue the command to install frappe:

curl https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh | sudo bash

and this terminates early where the mysql root password is being read:

Starting nginx: [ OK ]
Starting memcached: [ OK ]
Enter mysql root password to set:
[ro…@test ~]#


The full log can be found here:

https://gist.githubusercontent.com/anonymous/21796f8da7ab285c93eb/raw/7b733f2466e67e1b76908ceb91cc372766a8bdb4/frappe-install-error


The script section relating to this is:

echo Enter mysql root password to set:
read -t 1 -n 10000 discard || true
read -p “Enter mysql root password to set:” -s MSQ_PASS
mysqladmin -u root password $MSQ_PASS


I’m a newbie to Centos and erpnext but have a lot of IT experience in the mini/mainframe area,  and am at this point stumped.

I’ve been unsuccessful at all attempts to paste into the virtual console of the VM window (if anyone knows how to paste into a VirtualBox console on a Centos 6.5 install – I’ve love to hear), so I ssh’ed into the VM and pasted the initial curl command line to do the install.  I did this from both iterm and the native terminal app on OSX, with the same results.  I have not


Any ideas ?




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5deeccbc-79c2-439a-b76c-f78d32445ee5%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Hi Robert,

On Thu, Jul 31, 2014 at 9:55 AM, Robert Miller ke...@gmail.com wrote:

I have duplicated this problem several times, and hope you can help:

Fresh install of Centos 6.5 , 64 bit, Basic Server, on a VirtualBox VM
hosted on OSX.

I issue the command to install frappe:

curl
https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
| sudo bash

and this terminates early where the mysql root password is being read:

Starting nginx: [ OK ]
Starting memcached: [ OK ]
Enter mysql root password to set:
[ro…@test ~]#

The full log can be found here:

https://gist.githubusercontent.com/anonymous/21796f8da7ab285c93eb/raw/7b733f2466e67e1b76908ceb91cc372766a8bdb4/frappe-install-error

The script section relating to this is:

echo Enter mysql root password to set:
read -t 1 -n 10000 discard || true
read -p “Enter mysql root password to set:” -s MSQ_PASS
mysqladmin -u root password $MSQ_PASS

I’m a newbie to Centos and erpnext but have a lot of IT experience in the
mini/mainframe area, and am at this point stumped.

Thanks for the details :slight_smile:
The issue is that on flushing the stdin with “read -t 1 -n 10000
discard || true” it is flushing the rest of the script being piped.

The fix is to download the script and run it. Would be great if you
try on a clean image.

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh

(Updated the readme)

I’ve been unsuccessful at all attempts to paste into the virtual console of
the VM window (if anyone knows how to paste into a VirtualBox console on a
Centos 6.5 install – I’ve love to hear), so I ssh’ed into the VM and pasted
the initial curl command line to do the install. I did this from both iterm
and the native terminal app on OSX, with the same results. I have not

I don’t think that’s possible (if you’re not running X ie the GUI). If
you are, you can use guest additions.

Any ideas ?


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (https://frappe.io/webnotes). So please consider donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/5deeccbc-79c2-439a-b76c-f78d32445ee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks,

Pratik
erpnext

Thank you Pratik your explanation to the problem:


I downloaded the file, then executed, on a fresh install, and got the following error:

ERROR: certificate common name “www.github.com” doesn’t match requested host name “raw.githubusercontent.com”.
To connect to raw.githubusercontent.com insecurely, use ‘–no-check-certificate’.

I added '–no-check-certificate’ to the wget and got the following error:


Starting supervisord:
Starting MySQL…                                           [  OK  ]
Starting redis-server:                                     [  OK  ]
Starting nginx:                                            [  OK  ]
Starting memcached:                                        [  OK  ]
Enter mysql root password to set:
Enter mysql root password to set:bash: line 0: cd: /home/root: No such file or directory
[ro…@test ~]#

I tried the bench command to see if the above error was significant, and got the following result:

[ro…@test ~]# bench init frappe-bench && cd frappe-bench
-bash: bench: command not found
[ro…@test ~]#

The full log after receiving your recommendations is here:

frappe-install-error-2 · GitHub




I don’t think that’s possible (if you’re not running X ie the GUI). If

you are, you can use guest additions.





Thank you for the suggestion on using guest additions if one is running X, which I will not be able to do in the final headless install, so I was hoping there was another solution.


Any other idea options to try ?


 



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7748e3ea-c713-46e6-9db7-c06cd519546b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Correct link to latest log file is:

frappe-install-error-2 · GitHub



On Thursday, July 31, 2014 1:20:01 AM UTC-4, Robert Miller wrote:

Thank you Pratik your explanation to the problem:


I downloaded the file, then executed, on a fresh install, and got the following error:

ERROR: certificate common name “www.github.com” doesn’t match requested host name “raw.githubusercontent.com”.
To connect to raw.githubusercontent.com insecurely, use ‘–no-check-certificate’.

I added '–no-check-certificate’ to the wget and got the following error:


Starting supervisord:
Starting MySQL…                                           [  OK  ]
Starting redis-server:                                     [  OK  ]
Starting nginx:                                            [  OK  ]
Starting memcached:                                        [  OK  ]
Enter mysql root password to set:
Enter mysql root password to set:bash: line 0: cd: /home/root: No such file or directory
[ro…@test ~]#

I tried the bench command to see if the above error was significant, and got the following result:

[ro…@test ~]# bench init frappe-bench && cd frappe-bench
-bash: bench: command not found
[ro…@test ~]#

The full log after receiving your recommendations is here:

https://gist.github.com/992403b01fae138a74f4.git




I don’t think that’s possible (if you’re not running X ie the GUI). If

you are, you can use guest additions.





Thank you for the suggestion on using guest additions if one is running X, which I will not be able to do in the final headless install, so I was hoping there was another solution.


Any other idea options to try ?


 



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0bcd6f42-6bdb-4f9b-9955-3eb454440797%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On Thu, Jul 31, 2014 at 10:50 AM, Robert Miller ke...@gmail.com wrote:

Thank you Pratik your explanation to the problem:

I downloaded the file, then executed, on a fresh install, and got the
following error:

ERROR: certificate common name “www.github.com” doesn’t match requested host
name “raw.githubusercontent.com”.
To connect to raw.githubusercontent.com insecurely, use
‘–no-check-certificate’.

I added '–no-check-certificate’ to the wget and got the following error:

Starting supervisord:
Starting MySQL… [ OK ]
Starting redis-server: [ OK ]

Starting nginx: [ OK ]
Starting memcached: [ OK ]
Enter mysql root password to set:
Enter mysql root password to set:bash: line 0: cd: /home/root: No such file
or directory
[ro…@test ~]#

I tried the bench command to see if the above error was significant, and got
the following result:

[ro…@test ~]# bench init frappe-bench && cd frappe-bench
-bash: bench: command not found
[ro…@test ~]#

The full log after receiving your recommendations is here:

frappe-install-error-2 · GitHub

I don’t think that’s possible (if you’re not running X ie the GUI). If
you are, you can use guest additions.

Thank you for the suggestion on using guest additions if one is running X,
which I will not be able to do in the final headless install, so I was
hoping there was another solution.

Any other idea options to try ?


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (https://frappe.io/webnotes). So please consider donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/7748e3ea-c713-46e6-9db7-c06cd519546b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

The script was supposed to create a user ‘frappe’ which it didn’t.

Run the following commads as root,

useradd -m -d /home/frappe -s $SHELL frappe
su frappe -c "cd /home/frappe && git clone
https://github.com/frappe/bench bench-repo"
pip install -e /home/frappe/bench-repo

Then login as frappe with the command, ‘su - frappe’

and proceed to setup the bench.

Thanks for the bug report!


Pratik
erpnext


Thank you Pratik

   Your suggestions worked perfectly.

    The PDF's are very nice!

Robert



 
The script was supposed to create a user 'frappe' which it didn't.

Run the following commads as root,

```
useradd -m -d /home/frappe -s $SHELL frappe
su frappe -c "cd /home/frappe && git clone
https://github.com/frappe/bench bench-repo"
pip install -e /home/frappe/bench-repo
```

Then login as frappe with the command, 'su - frappe'

and proceed to setup the bench.

Thanks for the bug report!

--
Pratik
erpnext



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3b012d91-004d-4a88-8e93-d8d95004efb0%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Had the same issue and it helped!
Any plans fixing the issue in https://github.com/frappe/bench or adding the commands to the documentation?
Bst, PS

Am Donnerstag, 31. Juli 2014 08:04:22 UTC+2 schrieb Pratik Vyas:
On Thu, Jul 31, 2014 at 10:50 AM, Robert Miller <ke...@gmail.com> wrote:
> Thank you Pratik your explanation to the problem:
>
>
> I downloaded the file, then executed, on a fresh install, and got the
> following error:
>
> ERROR: certificate common name “www.github.com” doesn’t match requested host
> name “raw.githubusercontent.com”.
> To connect to raw.githubusercontent.com insecurely, use
> ‘--no-check-certificate’.
>
> I added '--no-check-certificate’ to the wget and got the following error:
>
>
> Starting supervisord:
> Starting MySQL..                                           [  OK  ]
> Starting redis-server:                                     [  OK  ]
>
> Starting nginx:                                            [  OK  ]
> Starting memcached:                                        [  OK  ]
> Enter mysql root password to set:
> Enter mysql root password to set:bash: line 0: cd: /home/root: No such file
> or directory
> [ro...@test ~]#
>
> I tried the bench command to see if the above error was significant, and got
> the following result:
>
> [ro...@test ~]# bench init frappe-bench && cd frappe-bench
> -bash: bench: command not found
> [ro...@test ~]#
>
> The full log after receiving your recommendations is here:
>
> https://gist.github.com/992403b01fae138a74f4.git
>
>
>
>
>
> I don't think that's possible (if you're not running X ie the GUI). If
> you are, you can use guest additions.
>
>
>
> Thank you for the suggestion on using guest additions if one is running X,
> which I will not be able to do in the final headless install, so I was
> hoping there was another solution.
>
>
> Any other idea options to try ?
>
>
>
>
>
> --
> Note:
>
> If you are posting an issue,
>
> 1. ERPNext is a free and open source software and support is given on this
> forum by a team (https://frappe.io/webnotes). So please consider donating if
> you find this forum useful (https://frappe.io/buy). Even a small amount
> would be helpful.
> 2. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 3. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 4. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer-forum+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/7748e3ea-c713-46e6-9db7-c06cd519546b%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

The script was supposed to create a user 'frappe' which it didn't.

Run the following commads as root,

```
useradd -m -d /home/frappe -s $SHELL frappe
su frappe -c "cd /home/frappe && git clone
https://github.com/frappe/bench bench-repo"
pip install -e /home/frappe/bench-repo
```

Then login as frappe with the command, 'su - frappe'

and proceed to setup the bench.

Thanks for the bug report!

--
Pratik
erpnext


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8c657a38-e610-4bf3-a854-343e2e74362b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On Sun, Sep 28, 2014 at 12:04 AM, Peter Schmidler
pe...@gmail.com wrote:

Had the same issue and it helped!
Any plans fixing the issue in GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps or adding the
commands to the documentation?
Bst, PS

Hi Peter,

Somehow, I am not able to replicate it.

https://github.com/frappe/bench/blob/master/install_scripts/setup_frappe.sh#L105

This if condition should have evaluated to true but doesn’t in this
case. Any clues?

Thanks,

Pratik
erpnext

Hi Pratik,

it does happen on a fresh digital ocean Ubuntu 14.04 x64 box after logging in via ssh as root end entering:

$ wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
$ sudo bash setup_frappe.sh

I get this error message: bash: line 0: cd: /home/root: No such file or directory
Here’s the complete log: DEBUG Ubuntu trusty amd64DEBUG adding debian mariadb repoIgn http://security - Pastebin.com

Than I tried to follow your instructions from before. (I added the “passwd frappe” step though).

$ useradd -m -d /home/frappe -s $SHELL frappe
$ passwd frappe
$ su frappe -c “cd /home/frappe && git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo”
$ pip install -e /home/frappe/bench-repo

Complete log: Obtaining file:///home/frappe/bench-repo Running setup.py (path:/home/frappe/ - Pastebin.com

$ su - frappe

Then I proceeded with the instructions from GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps.

$ cd ~
$ bench init frappe-bench
$ cd frappe-bench
$ bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
$ bench new-site site1.local
$ bench frappe --install_app erpnext site1.local

$ bench setup supervisor
$ sudo ln -s pwd/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf

I get this message: frappe is not in the sudoers file. This incident will be reported.

$ bench setup nginx
$ sudo ln -s pwd/config/nginx.conf /etc/nginx/conf.d/frappe.conf

I get this message: frappe is not in the sudoers file. This incident will be reported.

When I now enter the IP of the box I see the “Welcome to nginx!” page.

Am I missing something?
How can I now access the app?
What about the “frappe is not in the sudoers file. …”
It would be cool to have an easy, documented way of getting ERPnext running on DO.

Thanks for your help!

Bst, PS

Am 27.09.2014 um 20:40 schrieb Pratik Vyas pd...@gmail.com:

On Sun, Sep 28, 2014 at 12:04 AM, Peter Schmidler
pe...@gmail.com wrote:

Had the same issue and it helped!
Any plans fixing the issue in GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps or adding the
commands to the documentation?
Bst, PS

Hi Peter,

Somehow, I am not able to replicate it.

https://github.com/frappe/bench/blob/master/install_scripts/setup_frappe.sh#L105

This if condition should have evaluated to true but doesn’t in this
case. Any clues?

Thanks,

Pratik
erpnext

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/557C285A-B4E7-4602-9B51-32A8C8201D2A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

$ bench setup supervisor
$ sudo ln -s pwd/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf

I get this message: frappe is not in the sudoers file. This incident will be reported.

$ bench setup nginx
$ sudo ln -s pwd/config/nginx.conf /etc/nginx/conf.d/frappe.conf

I get this message: frappe is not in the sudoers file. This incident will be reported.

When I now enter the IP of the box I see the “Welcome to nginx!” page.

Am I missing something?
How can I now access the app?
What about the “frappe is not in the sudoers file. …”
It would be cool to have an easy, documented way of getting ERPnext running on DO.

Thanks for your help!

Bst, PS

Hi Peter,

It seems that the production setup steps don’t work for you. Run the
following commands as root,

rm /etc/nginx/sites-available/default
ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
supervisorctl reload
service nginx reload

The guide is divided two parts, getting and setting up the bench and
production deployment. We can make a consolidated one, maybe in the
digitalocean wiki too.


Pratik
erpnext

In https://github.com/frappe/bench/blob/master/README.md it says: sudo bash setup_frappe.sh

But in https://github.com/frappe/bench/blob/master/install_scripts/setup_frappe.sh#L105 it says:
# Check if script is running as root and is not running as sudo. We want to skip
# this step if the user is already running this script with sudo as a non root user

Should we possibly run the bash script without sudo?

Bst PS

Am Samstag, 27. September 2014 20:40:47 UTC+2 schrieb Pratik Vyas:
On Sun, Sep 28, 2014 at 12:04 AM, Peter Schmidler
<pe...@gmail.com> wrote:
> Had the same issue and it helped!
> Any plans fixing the issue in https://github.com/frappe/bench or adding the
> commands to the documentation?
> Bst, PS
>

Hi Peter,

Somehow, I am not able to replicate it.

 https://github.com/frappe/bench/blob/master/install_scripts/setup_frappe.sh#L105

This if condition should have evaluated to true but doesn't in this
case. Any clues?

Thanks,
--
Pratik
erpnext


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e094c73c-16ef-4cf2-a356-383b778bcae0%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Ok, let's do a consolidated one! Any help is highly appreciated.

I have succeeded (partially) with the installation by following this https://github.com/frappe/bench/blob/master/README.md

I had to apply some changes to the instruction, though:

1. I stripped the sudo at the installation bash script "bash setup_frappe.sh"
2. I stripped the sudos at the symlinks of ngnix and supervisor
3. I added "rm /etc/nginx/sites-available/default" before the ngnix restart.
4. I added "supervisorctl reload" and "service nginx reload"

There are some questions that remain for me:

1. Is there a better/more secure way than doing the installation as root?
2. Is the step "sudo bench setup sudoers $(whoami)" necessary, the sudo be stripped, too, right?
3. After the installation I see the login page but the files in the "lib" and "assets" folders return 404s.

My current installation procedure is as follows:
  • wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
  • bash setup_frappe.sh # before: sudo...
  • cd ~
  • bench init frappe-bench
  • cd frappe-bench
  • bench get-app erpnext https://github.com/frappe/erpnext
  • bench new-site site1.local
  • bench frappe --install_app erpnext site1.local
  • bench setup supervisor
  • ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf # before: sudo ...
  • supervisorctl reload # new
  • sudo bench setup sudoers $(whoami) # strip the sudo, too?
  • bench setup nginx
  • ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf # before: sudo ...
  • rm /etc/nginx/sites-available/default  # new
  • service nginx reload # new


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/132fb8c5-9f86-4951-9545-7ac7bdba1d7c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Hi Peter,

Replies inline…

  1. Is there a better/more secure way than doing the installation as root?

Things that happen as root,

  • Installation of packages (almost everything in setup_frappe.sh)
  • linking of supervisor and nginx configs
  • setting up of sudoers file to make restart of supervisor process passwordless
  1. Is the step “sudo bench setup sudoers $(whoami)” necessary, the sudo be
    stripped, too, right?

Basically, this and only this bench command should be run as
superuser. It creates a sudoers file that makes sudo supervisorctl restart frappe: command passwordless.

  1. After the installation I see the login page but the files in the “lib”
    and “assets” folders return 404s.

What’s in the nginx logs (/var/logs/nginx/)? If you get permission error, try

chmod o+x /home/frappe
chmod g+x /home/frappe

All bench commands (except sudoers one) are to be run as frappe user
and not root or using sudo.

Thanks,

Pratik
erpnext

Hi Pratik,

Am 28.09.2014 um 14:45 schrieb Pratik Vyas pd...@gmail.com:

What’s in the nginx logs (/var/logs/nginx/)? If you get permission error, try

chmod o+x /home/frappe
chmod g+x /home/frappe

I tried these commands and only the bin 404 disappeared.

Here’s my Ngnix error log.

Thanks!

PS

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/166DA141-ACB6-4D6B-9D93-EFA157CA4791%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

On Sun, Sep 28, 2014 at 8:12 PM, Peter Schmidler
pe...@gmail.com wrote:

Hi Pratik,

Am 28.09.2014 um 14:45 schrieb Pratik Vyas pd...@gmail.com:

What’s in the nginx logs (/var/logs/nginx/)? If you get permission error, try

chmod o+x /home/frappe
chmod g+x /home/frappe

I tried these commands and only the bin 404 disappeared.

Here’s my Ngnix error log.

2014/09/28 08:17:56 [emerg] 12854#0: a duplicate default server for 0.0.0.0:80 i - Pastebin.com

Thanks!

PS

I see that your bench is in /root

It should be in /home/frappe owned by frappe user.

What is the output of which bench ?


Pratik
erpnext

What is the output of which bench ?

/usr/local/bin/bench

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/88FEEE8E-3F71-45B3-8E1A-7EF8C8914057%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

So the first thing I would do on a fresh ubuntu box would be to cretae a frappe user, right?

Am 28.09.2014 um 14:45 schrieb Pratik Vyas pd...@gmail.com:

Hi Peter,

Replies inline…

  1. Is there a better/more secure way than doing the installation as root?

Things that happen as root,

  • Installation of packages (almost everything in setup_frappe.sh)
  • linking of supervisor and nginx configs
  • setting up of sudoers file to make restart of supervisor process passwordless
  1. Is the step “sudo bench setup sudoers $(whoami)” necessary, the sudo be
    stripped, too, right?

Basically, this and only this bench command should be run as
superuser. It creates a sudoers file that makes sudo supervisorctl restart frappe: command passwordless.

  1. After the installation I see the login page but the files in the “lib”
    and “assets” folders return 404s.

What’s in the nginx logs (/var/logs/nginx/)? If you get permission error, try

chmod o+x /home/frappe
chmod g+x /home/frappe

All bench commands (except sudoers one) are to be run as frappe user
and not root or using sudo.

Thanks,

Pratik
erpnext

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to a topic in the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/Wc9gUbKzMwg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAG8U0Ek-dzx9SHv-jcY_qFET%3Dk_0tfYpGUvE9krv%2BLSxxeDcBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0172B7B8-5665-4B32-98DE-D54C890296C6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

So this is my new setup instructions.
Will refine and try again on a fresh box, tomorrow.

	* wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
	* bash setup_frappe.sh # if sudo no frappe user will be created
	* # give frappe user a password and switch to frappe user
	* cd ~
	* bench init frappe-bench
	* cd frappe-bench
	* bench get-app erpnext https://github.com/frappe/erpnext
	* bench new-site site1.local
	* bench frappe --install_app erpnext site1.local
	* bench setup supervisor
	* sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
	* supervisorctl reload # new
	* sudo bench setup sudoers $(whoami)
	* bench setup nginx
	* sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
	* rm /etc/nginx/sites-available/default  # new
	* service nginx reload # new

Am 28.09.2014 um 16:53 schrieb Pratik Vyas pd...@gmail.com:

On Sun, Sep 28, 2014 at 8:12 PM, Peter Schmidler
pe...@gmail.com wrote:

Hi Pratik,

Am 28.09.2014 um 14:45 schrieb Pratik Vyas pd...@gmail.com:

What’s in the nginx logs (/var/logs/nginx/)? If you get permission error, try

chmod o+x /home/frappe
chmod g+x /home/frappe

I tried these commands and only the bin 404 disappeared.

Here’s my Ngnix error log.

2014/09/28 08:17:56 [emerg] 12854#0: a duplicate default server for 0.0.0.0:80 i - Pastebin.com

Thanks!

PS

I see that your bench is in /root

It should be in /home/frappe owned by frappe user.

What is the output of which bench ?


Pratik
erpnext

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to a topic in the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/Wc9gUbKzMwg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAG8U0E%3DswK2GLGs%2BKgeV%3DJvpWPF0MiaVKDyiENqutbOQwqnVNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9EAED3FE-229E-4B97-A813-F7ED1843CF25%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

On Sun, Sep 28, 2014 at 8:42 PM, Peter Schmidler
pe...@gmail.com wrote:

So this is my new setup instructions.
Will refine and try again on a fresh box, tomorrow.

            * wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
            * bash setup_frappe.sh # if sudo no frappe user will be created
            * # give frappe user a password and switch to frappe user
            * cd ~
            * bench init frappe-bench
            * cd frappe-bench
            * bench get-app erpnext https://github.com/frappe/erpnext
            * bench new-site site1.local
            * bench frappe --install_app erpnext site1.local
            * bench setup supervisor
            * sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
            * supervisorctl reload # new
            * sudo bench setup sudoers $(whoami)
            * bench setup nginx
            * sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
            * rm /etc/nginx/sites-available/default  # new
            * service nginx reload # new

Great, was about to suggest starting afresh.

Also, updating your instructions,

As root,

            * wget

https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
* bash setup_frappe.sh # if sudo no frappe user will be created
* # give frappe user a password and switch to frappe user

As frappe,

            * cd ~
            * bench init frappe-bench
            * cd frappe-bench
            * bench get-app erpnext https://github.com/frappe/erpnext
            * bench new-site site1.local
            * bench frappe --install_app erpnext site1.local
            * bench setup supervisor
            * bench setup nginx

Switch to root,

            * cd /home/frappe/frappe-bench &&  bench setup sudoers frappe
            * sudo ln -s `pwd`/config/nginx.conf

/etc/nginx/conf.d/frappe.conf
* sudo ln -s pwd/config/supervisor.conf
/etc/supervisor/conf.d/frappe.
conf
* rm /etc/nginx/sites-available/default # new
* supervisorctl reload # new
* service nginx reload # new

Looks good ?


Pratik
erpnext

1 Like

Cool, thanks Pratnik! It worked flawlessly!

  1. Please be kind and don’t send large attachments
  2. For issues, features requests use Issues · frappe/erpnext · GitHub

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/17ED9909-BE80-4CD0-AEED-EDF3341CB035%40gmail.com.
For more options, visit https://groups.google.com/d/optout.