Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari: to avoid root use account

Ambari: to avoid root use account

New Contributor

Hi All,

I have 2 questions :

1) Is it possible to setup Ambari to avoid to use the root account durnig the installation step?

2) Can we change the installation path? I can see that Ambari installe some folders (kafka_log, hadoop) just under /. I want to avoid this in my production environement. And also som log file under /var. Which is not a right place from my opinion to put the log files.

So, I 'm interested by any suggestion and exeprience on how to customize an Ambari server behavior regarding the installation path.

Thanks and Regards

Farhad

6 REPLIES 6

Re: Ambari: to avoid root use account

The following link talks about how to configure and run ambari-sever / agent as a non root user:

https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.1.1/bk_Ambari_Security_Guide/content/_configuri...

Re: Ambari: to avoid root use account

Regarding (2), you can control the placement of HDFS directories by setting the following properties during cluster installation: dfs.namenode.name.dir, dfs.datanode.data.dir. The placement of Kafka nodes is controlled by log.dirs. Typically you point all 3 properties to disk volumes allocated on each node for respective services. Be sure to check them because by default Ambari will put all mounted volumes there. You can also customize the location of logs, but since there are many services it's easier to mount /var/log on a separate partition.

Re: Ambari: to avoid root use account

@Farhad Heybati

You can change the user who runs the Ambari service after the installation, but root access is needed to install the Ambari packages. This is just how Linux package management works. You can set up sudo rules to allow the ambari user to install the packages and run the initial setup, but that will still require root access to setup sudo.

Changing the log locations is supported, but changing where the binaries are installed is not. /var/log is the standard location for log files on a Linux system. While you can move where the logs are stored, it doesn't make a whole lot of sense to do so. Since most of the Ambari files are stored in /var/lib and the logs are in /var/log, you should mount a separate /var file system. Similarly, the HDP files are stored in /usr/hdp, so mounting a separate /usr file system is also advisable. This is SOP for laying out filesystems on UNIX and Linux systems.

Re: Ambari: to avoid root use account

New Contributor

Thank you for your responses.

Regards

Farhad

Re: Ambari: to avoid root use account

Contributor

@Farhad Heybati

Another option would be to create symlinks to the original log location.

Re: Ambari: to avoid root use account

Hi @Farhad Heybati, please consider to up-vote/accept helpful answers. Tnx!