Sunday, June 6, 2010

Linux Network configuration files and config

 

==============HOSTNAME CHANGE============================================

[root@siebeldbserver ~]# cat /etc/sysconfig/network | grep HOSTNAME

HOSTNAME=siebeldbserver

[root@siebeldbserver ~]# cp /etc/sysconfig/network /etc/sysconfig/network.old

[root@siebeldbserver ~]# vi /etc/sysconfig/network

[root@siebeldbserver ~]# service xinetd restart

Stopping xinetd: [ OK ]

Starting xinetd: [ OK ]

[root@siebeldbserver ~]# hostname

siebeldbserver

[root@siebeldbserver ~]# cat /etc/sysconfig/network | grep HOSTNAME

HOSTNAME=siebeloracle

[root@siebeldbserver ~]#

[root@siebeldbserver ~]# sysctl kernel.hostname=siebeloracle

kernel.hostname = siebeloracle

[root@siebeldbserver ~]# hostname

siebeloracle

[root@siebeldbserver ~]#

============================== IP CHANGE ============================

Through console I logged in to the server and with the command below

Opened the GUI tool and altered the valuesc and saved.

system-config-network &

Then brought up eth1 by:

ifconfig eth1 192.168.10.65 netmask 255.255.255.0 up

From master it's connecting through "ssh" :

saptarshi@master:~$ ssh root@192.168.10.65

The authenticity of host '192.168.10.65 (192.168.10.65)' can't be established.

RSA key fingerprint is ac:59:0c:f8:f6:87:8a:04:93:d3:6f:84:03:2e:fd:a5.

Are you sure you want to continue connecting (yes/no)? yers

Please type 'yes' or 'no': yes

Warning: Permanently added '192.168.10.65' (RSA) to the list of known hosts.

root@192.168.10.65's password:

Last login: Wed May 5 15:18:58 2010 from 192.168.10.10

[root@siebeloracle ~]# df -k

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/mapper/VolGroup00-LogVol00

104809552 9440744 89958812 10% /

/dev/cciss/c0d0p1 101086 15330 80537 16% /boot

tmpfs 16414500 0 16414500 0% /dev/shm

/dev/cciss/c1d0 423277944 337697340 64079324 85% /DATA

 

 

Files:

[root@siebelapp1 ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

192.168.10.65 siebeloracle

192.168.10.66 siebelweb1

192.168.10.67 siebelapp1

192.168.10.69 siebelapp2

192.168.10.10 master

[root@siebelapp1 ~]# df -k

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/mapper/VolGroup00-LogVol00

68345400 40142480 24731152 62% /

/dev/cciss/c0d0p1 101086 32556 63311 34% /boot

none 33021188 0 33021188 0% /dev/shm

[root@siebelapp1 ~]# cat /etc/resolv.conf

; generated by /sbin/dhclient-script

search americas.hpqcorp.net

nameserver 16.110.135.52

nameserver 16.110.135.51

[root@siebelapp1 ~]# cat /etc/nsswitch.conf

#

# /etc/nsswitch.conf

#

# An example Name Service Switch config file. This file should be

# sorted with the most-used services at the beginning.

#

# The entry '[NOTFOUND=return]' means that the search for an

# entry should stop if the search in the previous entry turned

# up nothing. Note that if the search failed due to some other reason

# (like no NIS server responding) then the search continues with the

# next entry.

#

# Legal entries are:

#

# nis or yp Use NIS (NIS version 2), also called YP

# dns Use DNS (Domain Name Service)

# files Use the local files

# db Use the local database (.db) files

# compat Use NIS on compat mode

# hesiod Use Hesiod for user lookups

# ldap Use LDAP (only if nss_ldap is installed)

# nisplus or nis+ Use NIS+ (NIS version 3), unsupported

# [NOTFOUND=return] Stop searching if not found so far

#

# To use db, put the "db" in front of "files" for entries you want to be

# looked up first in the databases

#

# Example:

#passwd: db files ldap nis

#shadow: db files ldap nis

#group: db files ldap nis

passwd: files

shadow: files

group: files

#hosts: db files ldap nis dns

hosts: files dns

# Example - obey only what ldap tells us...

#services: ldap [NOTFOUND=return] files

#networks: ldap [NOTFOUND=return] files

#protocols: ldap [NOTFOUND=return] files

#rpc: ldap [NOTFOUND=return] files

#ethers: ldap [NOTFOUND=return] files

bootparams: files

ethers: files

netmasks: files

networks: files

protocols: files

rpc: files

services: files

netgroup: files

publickey: files

automount: files

aliases: files

[root@siebelapp1 ~]#

[root@siebelapp1 ~]# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=siebelapp1

[root@siebelapp1 ~]#

No comments:

Post a Comment