Beruflich Dokumente
Kultur Dokumente
Change IP, Gateway, Hostname and DNS Information (We need this changingfor client-server communication in LAB)
- File containing IP, Gateway and DNS Information: /etc/sysconfig/network-scripts/ifcfg-eth0 - File containing Hostname Information: /etc/sysconfig/network
LAB Practice:
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.0.20 NETMASK=255.255.255.0 GATEWAY=192.168.0.254 DNS1=192.168.0.254 -----------------------> introduced in RHEL6
# vim /etc/sysconfig/network
1/4
RH124-Day02
Written by Razib Shahriar Rubence
- Restart the network service to make each of the above information effective. Need to reboot machine for hostname change
# ifconfig (for IP Information) # route -n (for Gateway Information) # hostname (for hostname information) # ping server1.example.com (checking your dns is resolving other computers' hostname) # dig server1.example.com (check the dns records ) 02. Graphical Way:
# system-config-network
Edit Information from "Devices" GNOME Graphical Desktop and Editing File with gedit: ------------------------------------------------------------------ GNOME is the graphical desktop environment which adds menus, icons,panels provided by the X windows system - It includes integrated applications - gedit, Nautilus File Manager, Graphical Administration Tool
2/4
RH124-Day02
Written by Razib Shahriar Rubence
- edit file with gedit. /etc/issue (To change the starting message); /etc/grub.conf (Changing the First boot OS in dual/multipel booting machine)
- edit the same file with vi/vim # vim /etc/issue # vim /etc/grub.conf
- Linux File Hierarchy Concepts: * Files and directories are organized into a single-rooted inverted tree structure * Filesystem begins at the root directory, represented by a lone / (forward slash) character * Names are case-sensetive * Paths are delimited by / * .. refers to the parent directory of any particular directory - one level up in the file hierarchy * . refres to the current directory - Some important directories: * Home Directories: /root, /home/username * User Executable (binary file): /bin, /usr/bin, /usr/local/bin (bin = binary) * System Executatble (system binary file): /sbin, /usr/sbin, /usr/local/sbin (sbin = system binary) * Other Mountpoings: /media, /mnt * Configuration: /etc * Temporary: /tmp * Kernels and Bootloader: /boot * Server Data: /var, /srv * System information: /proc, /sys (proc -> process information pseudo-filesystem * Shared Library: /lib, /usr/lib, /usr/local/lib - Absolute Pathnames: * Begin with a forward slash
3/4
RH124-Day02
Written by Razib Shahriar Rubence
* Complete "road map" to file location * can be used anytime you wish to specify a file name - Relative Pathnames: * Do not begin with a slash * Specify location relative to our current workding directory * Can be used as a shorter way to specify a directory or filename Relative pathnames of a specific file /usr/share/doc/HTML/index.html relative to particular directories
/usr/share/doc/HTML ---------------> index.html /usr/share/doc ----------------> HTML/index.html /usr/share ----------------> doc/HTML/index.html / -----------------> usr/share/doc/HTML/index.html /usr/share/doc/HTML/en ------------> ../index.html /usr/share/doc/nautilus-2.1.91 ------------> ../HTML/index.html /etc --------------> ../usr/share/doc/HTML/index.html
4/4