Friday, June 27, 2008

Usefull configuration files

Shell
bash file configuration file: /etc/bashrc

System
Globe environment variable and startup program: /etc/profile

Connection tracking: /proc/net/ip_conntrack

Iptable configuration file: /etc/sysconfig/iptable

Log system configuration file: /etc/syslog.conf

Network interface configuration file: /etc/sysconfig/network-script/ifcfg-eth*
  • TYPE= Ethernet or Token Ring
  • USERCTL=no or yes whether allow normal user active or inactive this NIC
  • IPV6INIT=no or yes whether can configure Ip version 6 address with this NIC
  • PEERDNS=yes or no whether get DNS info from DHCP server
  • BOOTPROTO=static, none or DHCP
Port for each service: /etc/services

Wednesday, June 25, 2008

How to change RHEL IP Adress

  1. Change in the Graphical console
  2. Change in the command line GUI
    system-config-network-tui
  3. Change the configuration file.
    Editing configuration files which stored in /etc/sysconfig/network-scripts/ directory. Those file separate by network interface name as "ifcfg-eth*".

    # Intel Corporation 82573E Gigabit Ethernet Controller (Copper)
    DEVICE=eth0
    BOOTPROTO=static
    DHCPCLASS=
    HWADDR=00:30:48:56:A6:2E
    IPADDR=10.10.29.66
    NETMASK=255.255.255.192
    ONBOOT=yes

    Save and close the file. Define default gateway (router IP) and hostname in /etc/sysconfig//network file:
    # vi /etc/sysconfig/network
    Append/modify configuration as follows:
    NETWORKING=yes
    HOSTNAME=www1.nixcraft.in
    GATEWAY=10.10.29.65

    Save and close the file. Restart networking:
    # /etc/init.d/network restart

    Make sure you have correct DNS server defined in /etc/resolv.conf file:
    # vi /etc/resolv.conf
    Setup DNS Server as follows:
    nameserver 10.0.80.11
    nameserver 10.0.80.12
    nameserver 202.67.222.222


Linux directory structure

  • Home Directories: /root,/home/username
  • User Executables: /bin, /usr/bin, /usr/local/bin
  • System Executables: /sbin, /usr/sbin, /usr/local/sbin
  • Other Mountpoints: /media, /mnt
  • Configuration: /etc
  • Temporary Files: /tmp
  • Kernels and Bootloader: /boot
  • Server Data: /var, /srv
  • System Information: /proc, /sys
  • Shared Libraries: /lib, /usr/lib, /usr/local/lib
  • Documents of most installed package: /usr/share/doc
  • New user template files: /etc/skel (all the files of folders under this directory will copy to /home/new user/* by useradd command)