Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to edit a configuration file

avatar
Explorer

Hello,

 

As part of a class I am in, we have tasks to edit the configuration files to include or change certain properties.   I have found numerous articles detailing the importance of changing these properties but cannot find any explaining HOW TO change properties, either through the CLI or the web interface.  We are using Hortonworks Hadoop Sandbox HDP through a virtual machine.  

 

For instance, in one of our tasks, we are to configure wire encryption.  I understand that I need to edit the core-site.xml configuration file to include the property 

 

hadoop.rpc.protection=privacy

 

But I do not understand how to do so.  I have tried going into the CLI, and the furthest I can make it is to change the directory to etc/hadoop/conf where the file is located.  I can also view the file properties using the vi command.  But how can I add a property to the file, or replace the value if it an existing property.  I have searched and searched google for a guide to do this but have had no luck.

 

I also tried going through Ambari -> files to find the core-site.xml file but I cannot find it.  I don't believe that the maria_dev profile that we are given to use has permissions to view that file perhaps, or it cannot be accessed through Ambari.  

 

I also tried using a connection through WinSCP to access the file directly from my computer, and edit it there, but when I tried to save the file I got a "Permission denied" message in response.

 

Very sorry if this is a basic question, and I greatly appreciate your help!

 

2 ACCEPTED SOLUTIONS

avatar
Expert Contributor

Hello @Chaos 

you can navigate to Ambari Web > Services > HDFS > Configs, then expand Advanced core-site.

Add the required configuration, save and restart (if required).

Let me know if this helps.

 

Cheers!

View solution in original post

avatar
Explorer

I learned that I needed to follow a series of steps to essentially enable the admin (root username) account.  The Maria_Dev and Raj_Ops accounts they provided did not have privileges to access or edit those files apparently.  I logged into the CLI as root with the default password of hadoop, then went through the mandatory password change procedure and the account was enabled.  With Root enabled I was able to access and edit the files via a connection through WinSCP.  I didn't try Ambari, though I'm certain that option would have worked as well.  When I initially tried accessing the directory under Ambari the etc folder and many others were not showing at all, like they were hidden.  I think that was due to the limited privileges of the other two accounts.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

Hello @Chaos 

you can navigate to Ambari Web > Services > HDFS > Configs, then expand Advanced core-site.

Add the required configuration, save and restart (if required).

Let me know if this helps.

 

Cheers!

avatar
Explorer

I learned that I needed to follow a series of steps to essentially enable the admin (root username) account.  The Maria_Dev and Raj_Ops accounts they provided did not have privileges to access or edit those files apparently.  I logged into the CLI as root with the default password of hadoop, then went through the mandatory password change procedure and the account was enabled.  With Root enabled I was able to access and edit the files via a connection through WinSCP.  I didn't try Ambari, though I'm certain that option would have worked as well.  When I initially tried accessing the directory under Ambari the etc folder and many others were not showing at all, like they were hidden.  I think that was due to the limited privileges of the other two accounts.