LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command Line Only -- Changing Hostnames, DNS, Gateway and IP on RHEL 5.6 (https://www.linuxquestions.org/questions/linux-newbie-8/command-line-only-changing-hostnames-dns-gateway-and-ip-on-rhel-5-6-a-4175433572/)

ftpgetme 10-22-2012 05:07 PM

Command Line Only -- Changing Hostnames, DNS, Gateway and IP on RHEL 5.6
 
First, I do not have a GUI Interface and I cannot set a display back for an x-term (Not Allowed), leaving me and Mr. Putty. I need to change the Hostname, IP, and "check" the gateway, subnet mask, DNS, SNMP string, to see if they are correct. I only need the file names I need to modify for a rhel 5.6 server. I went to RedHat and it seems they are most than willing to assist if you have a subscription. I know "vi" and was a Unix Admin a few years back. (OK, it was more than a few and more like a lot of years. HPUX-9 was just out.) Now I find myself needing a list of files for RedHat and a couple of answers. I just need a list of the files like edit the /etc/host file.
I believe I have to take the NIC down?
I believe I am on eth0.
Do I need to modify the route or check it?
How about bouncing the server? (Yes - No - or change Runlevel) I do not have any console access, just ssh and root. If I only need to change the runlevel without console, can I run from a runlevel 3 to a runlever 1 and back with this string: init 1; sleep 15; init 3;sleep 5; echo `runlevel` Without a console, does that work? I know that is a lot of questions so, "Thanks in advance".
Regards,
ftpgetme

ButterflyMelissa 10-22-2012 05:16 PM

Quote:

Not Allowed
...is this homework??? :D

RHEL is similar to Fedora, I'd look tru that documntation...

Looking on to see where this goes... :)

Thor

chrism01 10-22-2012 05:47 PM

1. bookmark and read http://www.linuxtopia.org/online_boo...ion/index.html

2. Try these cmds to get the first few bits of info (I'm hoping this isn't homework ...)
Code:

cat /etc/sysconfig/network

ifconfig

route -n

Please clarify what you mean by 'DNS, SNMP string'.


All times are GMT -5. The time now is 02:55 PM.