AmbariのHostname途中で変更した
[root@hokuto centos]# python
Python 2.7.5 (default, Jul 13 2018, 13:06:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> print socket.getfqdn()
data-demo.work
>>>
Author And Source
この問題について(AmbariのHostname途中で変更した), 我々は、より多くの情報をここで見つけました https://qiita.com/zzeng/items/59f3e95de167832b6911著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .