I try to install erpnext on centos 6.x minimal (OpenVZ VPS)
Before install I have update the VPS to lastest version by #yum update
then execute the installation command and ran into this problem
[root@erp ~]# sudo bash setup_frappe.sh --setup-production
Installing for centos 6 amd64
In case you encounter an error, you can post on https://discuss.frappe.io
Adding centos mariadb repo
Installing packages for centos. This might take time...
Installing wkhtmltopdf
Installing supervisor
Starting supervisord:
Configuring CentOS services
Starting services
Adding frappe user
Installing frappe-bench
Setting up first site
Restarted supervisord
nginx: [emerg] unknown directive "proxy_http_version" in /etc/nginx/conf.d/frappe.conf:40
nginx: configuration file /etc/nginx/nginx.conf test failed
Traceback (most recent call last):
File "/usr/bin/bench", line 9, in <module>
load_entry_point('bench==0.92', 'console_scripts', 'bench')()
File "/home/frappe/bench-repo/bench/cli.py", line 60, in cli
bench()
File "/usr/lib64/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/home/frappe/bench-repo/bench/cli.py", line 456, in setup_production
_setup_production(user=user)
File "/home/frappe/bench-repo/bench/production_setup.py", line 67, in setup_production
restart_service('nginx')
File "/home/frappe/bench-repo/bench/production_setup.py", line 11, in restart_service
exec_cmd("{service_manager} {service} restart ".format(service_manager='service', service=service))
File "/home/frappe/bench-repo/bench/utils.py", line 104, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: service nginx restart
Step 4. Setup nginx using bench command (assuming your setup_frappe.sh worked correctly and installed bench on your system, if not then reload OS and start again fresh)
It seems that the ngnix conf is not compatible with your nginx version. You should update nginx (they’ve repositories that provide the latest versions) and try sudo service nginx reload
Also, if this is a fresh install, I’d suggest installing CentOS 7
I was not able to resolve the issue with this. Getting below error.
Traceback (most recent call last):
File "/usr/bin/bench", line 9, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
File "/home/frappe/bench-repo/bench/cli.py", line 60, in cli
bench()
File "/usr/lib64/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1057, in invoke
Command.invoke(self, ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/frappe/bench-repo/bench/cli.py", line 151, in bench
setup_logging(bench=bench)
File "/home/frappe/bench-repo/bench/utils.py", line 237, in setup_logging
hdlr = logging.FileHandler(log_file)
File "/usr/lib64/python2.7/logging/__init__.py", line 911, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib64/python2.7/logging/__init__.py", line 941, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/frappe/frappe-bench/logs/bench.log'