Setting hostname on Centos 7

  1. I have centos 7.2 installed and working
  2. I have ver 7 erpnext installed and configured in production and working from external ip

What do I have to do command specific to:
(and yes I have been through the manuals and searched the forums only to be disappointed over the last month or so because syntax changes or it just doesn’t work as its supposed to):
a) turn on multi tenant
b) change hostname
c) allow www.domain.com and domain.com to also be served by site which is sever.domain.com
d) install third party certificate

And mind you I know there are bench commands out there but I have on numerous occasions gotten errors on fresh installs so I would like just the ones that work with ver 7 as the docs don’t seem to be updated…

Can you open the site using IP address?

Can you please report specific issues so we can fix the documentation?

Yes what we need is an updated version 7 “how to install manual” so we don’t have to query the forums and find that the beech command doesn’t work in this version. Everything seems to go fine with the “easy install” on cent os 7.2 better than Ubuntu…Its when you start trying to modify hostname and ssl that things get messed up if we could have those specific steps added with command and users to execute that work after easy install that would be great…

for example when I you can see why specific documentation is necessary for this product:
sudo mv site1.local server.domain.com
bench --site server.domain.com set-config host_name server.domain.com

Traceback (most recent call last):
File “/usr/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 26, in cli
return frappe_cmd()
File “/home/frappe/.bench/bench/cli.py”, line 87, in frappe_cmd
os.chdir(os.path.join(bench_path, ‘sites’))
OSError: [Errno 2] No such file or directory: ‘./sites’

@imllc

What is your current working directory (CWD or PWD) from which you are trying to execute this command ?

frappe-bench this is what I am talking about with comprehensive instructions we would be wasting peoples time by posting trivial questions.

when I run this command as frappe I get this error:
bench --site server.domain.com set-config host_name server.domain.com

Traceback (most recent call last):
File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 372, in set_config
frappe.init(site=site)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 121, in init
local.conf = _dict(get_site_config())
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 173, in get_site_config
config.update(get_file_json(site_config))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 835, in get_file_json
return json.load(f)
File “/usr/lib64/python2.7/json/init.py”, line 290, in load
**kw)
File “/usr/lib64/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python2.7/json/decoder.py”, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib64/python2.7/json/decoder.py”, line 383, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded

@imllc

Looking at error it seems your site_config.json or common_site_config.json is missing either comma or matching quotes.

Please verify that your JSON files are perfect. You can find them in sites folder.

this was a fresh install and we haven’t touched those files why would this be?

al right it was missing quotes in the host name but sit still not working…