Help needed - RHL


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help needed - RHL
# 1  
Old 11-21-2013
Help needed - RHL

Hi,
have been given a dell server with redhat linux installed , in my new company on my desk , have not worked much on linux. Was also given a static IP.

I dont have a console, but a monitor, that I switch between my desktop and this server.

yesterday I wanted to change IP of the server from dynamic to static IP. Using my monitor connected to that server
I changed ip in /etc/hosts and used init 3 to reboot. After that, nothing shows up on the monitor. I tried hard booting multiple times, and tried all combinations on keyboard, ( ctl+alt+del/ctl+alt+F1/ctl+alt+backspace etc) , but nothing comes up. Does anyone know how to get this machine show up on screen.

Please help .
# 2  
Old 11-21-2013
Quote:
Originally Posted by abhi123
I changed ip in /etc/hosts and used init 3 to reboot.
Reboot would be init 6. I think 'init 3' might be 'shut down all network applications', which includes graphical user interfaces as far as Linux is concerned.

If you have keyboard/monitor to a Linux PC, you do have a physical terminal -- several in fact. You can switch between them at will with ctrl-alt-f1 (or alt-f1 on some machines) through ctrl-alt-f12. The GUI lives in one of these terminals, so at least one will be blank right now.
# 3  
Old 11-21-2013
init 3 is the standard multi-user run level (without X). Running it doesn't reboot the server, it just changes the run level.

Regarding the "boot proto" setting, the file to change your IP from dynamic to static is /etc/sysconfig/network-scripts/ifcfg-ethn, not /etc/hosts.

What exactly do you see when you reboot the "server"? What means "nothing comes up"?
# 4  
Old 11-21-2013
You have erred on many levels. We'll go through it one by one:

Quote:
Originally Posted by abhi123
I dont have a console, but a monitor, that I switch between my desktop and this server.
A "console" is a certain form of a terminal - one that is directly attached to the system (instead of being attached via network lines, etc.). Usually this is the "terminal of last resort" if everything else fails. Basically, terminals are serially attached. You could connect the serial port of the server with a serial cable to your PC, start a terminal emulation (IIRC this is called "HYPERTERM" in Windoze) and get a connect once you choose the right baud rate, etc..

Quote:
Originally Posted by abhi123
yesterday I wanted to change IP of the server from dynamic to static IP. Using my monitor connected to that server
I changed ip in /etc/hosts and used init 3 to reboot.
This won't work at all. "/etc/hosts" is a file for name resoultion, nothing else. You can write there whatever you want, it won't change the IP address one iota.

Your computer has to translate network names like "www.unix.com" to network addresses somehow (and vice versa). There is a network service for this, called DNS (Domain Name Service), but there are also other means: NIS (Network Information Service, also called "Yellow Pages", "YP") and the local file "/etc/hosts". This is a simple table, one IP address and its corresponding name(s) per line. The file /etc/netsvc.conf tells the system which of the available service(s) takes precedence.

To change your IP address use the "ifconfig" command, to activate and deactivate your network interface use the same. See "man ifconfig" for details. CAUTION: if you are connected via a network connection and change your IP your connection is lost! Because UNIX-processes which lose their terminal are terminated you have to execute such a command with the "nohup" command (see "man nohup" for details).

Now, about runlevels: runlevels are different configurations of a system. After a system has started some basic services a certain "runlevel" is entered. There is a directory /etc/rc.d where a directory for every runlevel resides. In this directory are start-scripts ("S....") and stop-scripts ("K...."). When a runlevel is entered all the start-scripts are executed. When the runlevel is left, all the stop-scripts are executed. Changing a runlevel means first leaving one and then entering a another.

Basically these scripts start/stop a certain service each. In principle you could use these runlevels as you please, but there is an (informal) standard in place:

0 - boot
1(S) - single user, no network
2 - Multiuser
3 - Multiuser with network
4,5 user-defined
6 Reboot

5 is most times associated with a GDM (Graphical Display Manager) started. Some Unix (AIX for instance) deviate slightly from this, but 0,1(=S mostly) and 6 is conventionally the same everywhere. If you want to reboot the system you should use the command for that, which is shutdown (see "man shutdown" for the appropriate options) or switch to runlevel 6.

I hope this helps.

bakunin
# 5  
Old 11-21-2013
A few points pertaining to Red Hat (where it differs from AIX or Solaris).
  • ifconfig changes are not persistent across a reboot
  • Red Hat states that ifconfig is obsolete, and suggests using ip instead
  • The file to set the authentication precedence is /etc/nsswitch.conf
  • Taken from /etc/inittab, run levels are described as
    Code:
    #   0 - halt (Do NOT set initdefault to this)
    #   1 - Single user mode
    #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
    #   3 - Full multiuser mode
    #   4 - unused
    #   5 - X11
    #   6 - reboot (Do NOT set initdefault to this)

    And the default is 3 or 5 depending on when a desktop was installed during installation.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help needed

For a student file with the following fields, rollno, name, marks. Generate 2 files ‘Pass' and ‘Fail‘containing records of student who have passed or failed. Also count the number of students who have passed or failed. (1 Reply)
Discussion started by: jainitai
1 Replies

2. Linux

Local NTP on RHL

Hi I have an offline system, no access to the internet. It has a number of windows vms as well as some physical Red hat linux servers. I would like to one of the linux servers as a NTP server, so its local time is used as the reference point for all the other vms. How do I do this. Most of the... (1 Reply)
Discussion started by: kelseyh1
1 Replies

3. Shell Programming and Scripting

Help needed

First of all, let me state that I am a windows admin. I have a windows share mounted to /mnt/server I need a script that will either login as sudo or perform commands with sudo rights. I need the script to copy all of the users /home folders to the mounted windows share. Now If I can... (2 Replies)
Discussion started by: EricM
2 Replies

4. IP Networking

Help needed

Hi, Can anyone please tell me where I can get the small projects with source code based on client-server programming using sockets in unix :confused::confused::confused: Thanks in advance... (1 Reply)
Discussion started by: smartgupta
1 Replies

5. Shell Programming and Scripting

Help needed

Hello all, I am new to unix.i need the interview questions commonly asked for shell scripting and unix.if anyone had the useful link please tell me. Thanks in advance... (1 Reply)
Discussion started by: ithirak17
1 Replies

6. AIX

Little help needed.

Hello, I am quite new to AIX, but have Linux experience. Iam facing a peoblem with AIX 5.2 running on a 43p Model 150 (RS6000). I tried everyting and i cant have the network to run properly. :confused: /etc/hosts looks like this: 127.0.0.1 loopback localhost 192.168.XXX.XXX... (5 Replies)
Discussion started by: Netghost
5 Replies

7. Shell Programming and Scripting

Help needed

Hi All, I need help in writing a script. I need a script that takes a name as a parameter and executes the follwoing steps. The name will be like BUDGET01_BARE_DLY_YYYYMMDD, BUDGET02_BARE_DLY_YYYYMMDD etc. The YYYYMMDD represent today( systemdate). This names have to be passed as... (2 Replies)
Discussion started by: dsravan
2 Replies

8. Debian

HDD not detected by RHL 9 (or 7.2)

Hi, I have got myself a new hard disk- a 80 GB SATA IDE from Seagate. When I try installing Red Hat Linux 9(and RHL 7.2 too), it displays an error message saying that it fails to detect any hard drive. In the BIOS, I tried changing the drive configuration to "Legacy Drive", but that didnt help... (5 Replies)
Discussion started by: Abhishek Ghose
5 Replies

9. UNIX for Dummies Questions & Answers

External Modem for RHL 7.3...

Another stupid question... and I can only hope someone can spend a little time answering it... So thats it. I went thru the documentation out there at linmodems.org, trie this and that... read thru this post https://www.unix.com/showthread.php?s=&threadid=1787 on my favorite forums. And... (3 Replies)
Discussion started by: Vishnu
3 Replies

10. UNIX for Dummies Questions & Answers

Dual booted RHL 7.3 with Win XP..

Hello all, I'm a no Linux expert! But I perfectly dual booted Win XP with RHL 7.3 on a hp pavilion notebook (model ze5170). All working fantastic now. But I have a minor problem now. I can't get RHL probe the modem, so could not get the internet connection working. The modem is a Conexant... (1 Reply)
Discussion started by: Vishnu
1 Replies
Login or Register to Ask a Question