Posts

To assign the virtual ethernet card in linux system

# To assign the virtual ethernet card in linux system ------------------------------------------------------ # Configuraton file: -------------------- /etc/sysconfig/network-scripts/ifcfg-eth0:x # Command: ---------- netconfig -d eth0:1 ip address: subnet mask: deault gateway: primary nameserver: # Turn on the services to get the effect chkconfig network on service network restart # Removal of virtual ethernet card: ----------------------------------- rm -rf /etc/sysconfig/network-scripts/ifcfg-eth0:x

System log messages or remote messages on Linux server

# System log messages or remote messages. ----------------------------------------- # Server Side: -------------- # Set up the syslogd to accept remote messages vi /etc/sysconfig/syslog 06 SYSLOGD_OPTIONS="-r -m -0" :wq # Restart the service chkconfig syslog on service syslog restart # Client Side: -------------- # Set up the syslogd to the client side to send the messages. # Append the /etc/syslogd.conf so; goto the E.O.F. and add the line as, 27 user.* @192.168.150.51 :wq # Restart the service chkconfig syslog on service syslog restart # Now test the set up by using logger to generate log messages, logger -i -t Viraj "This is a test message so plz; accept it." # To check this message goto the Server end and check it out, cat /var/log/messages

Configuration Of Squid proxy in Linux server

# Configuration Of Squid proxy. ------------------------------- # Required RPMs: ---------------- squid-2.6.STABLE6-3.el5 # Configuration Files: ---------------------- /etc/squid/squid.conf # Required Services and Daemons: -------------------------------- squid # Configuration Steps: ---------------------- # Goto the configuration file vim /etc/squid/squid.conf 0071 http_port 3128 -Can change the port no. 2394 acl all src 0.0.0.0/0.0.0.0 2395 acl raj src 192.168.150.0/24 2506 http_access allow manager localhost 2507 http_access allow raj -Put this line here only. 2508 http_access deny manager :wq # Turn on the services and daemons chkconfig squid on service squid restart # Goto GUI and Turn on the web browser Goto--->Firefox--->Edit--->Prefrences--->Connection Settings--->Manual proxy configuration---> HTTP Proxy: 192.168.150.51 Port: 3128 # After doing all this click on ok. # This configuration will allow the web access ...

Configuration Of Sendmail Server

# Configuration Of Sendmail Server ---------------------------------- # Port Number:25 ---------------- # Required RPMS: ---------------- sendmail-8.13.8-2.el5 sendmail-cf-8.13.8-2.el5 sendmail-doc-8.13.8-2.el5 sendmail-devel-8.13.8-2.el5 dovecot-1.0-1.2.rc15.el5 # Configuration Files: ---------------------- /etc/mail/sendmail.mc /etc/dovecot.conf # Services & Daemons: --------------------- sendmail dovecot # Configuration Steps: ---------------------- # Goto the configuration file and disable line no.116 and Add your domain name to the line no.155 vi /etc/mail/sendmail.mc 116 dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 155 LOCAL_DOMAIN(`server.cms.com')dnl :wq # Redirect the output of this file as, cd /etc/mail/ m4 sendmail.mc > sendmail.cf # Then Goto the following file and enable the protocols at line no.17. vi /etc/dovecot.conf 17 protocols = imap imaps pop3 pop3s :wq # Goto the following file and disable all...

Configuration of Samba Server.

# Configuration of Samba Server. -------------------------------- # Required RPMs: ---------------- system-config-samba-1.2.39-1.el5 samba-common-3.0.23c-2 samba-client-3.0.23c-2 samba-3.0.23c-2 samba-swat-3.0.23c-2 # Configuration Files: ---------------------- /etc/samba/smb.conf # Required Services and daemons: -------------------------------- smb # Configuration Steps: ---------------------- vi /etc/samba/smb.conf 041 hosts allow=192.168.150. 279 [E] 280 comment = Share 281 path = /E 282 writable = yes 283 browseable = yes 284 guest ok = yes :wq # Also we can add another fields. # Creation of Samba User. ------------------------- useradd -s /sbin/nologin user1 smbpasswd -a user1 or useradd user1 passwd user1 smbpasswd -a user1 # Turn on the Services and Daemons. chkconfig smb on service smb restart # To verify the Server on Unix machine smbclient -L //192.168.150.51   passwd:press enter - Don't give any pasword. smbclient -...

Recovery of system via rescue mode

# Recovery of system via rescue mode ------------------------------------- # Insert the bootable CD/DVD of o.s & boot the system boot:linux rescue ---> Press Enter network support ---> Yes/No ---> Continue bs-sh# chroot /mnt/sysimage bs-sh# grub-install /dev/hda bs-sh# reboot # Curruption of grub manually ------------------------------ # Insert the bootable CD of Win-98 and use the command fdisk /mbr

Configuration of RAID5.

# Configuration of RAID5. ------------------------ # Create the Four partitions which must be raid partitions. fdisk /dev/hda n--->l--->Enter the First Cylinder--->+100M--->t--->partition no--->fd--->w. # Reboot the System or use the following command. partprobe /dev/hda # Create the RAID device for above partitions. mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/hda{11,12,13} --spare-devices=1 /dev/hda14 # Then format this RAID device. mke2fs -j /dev/md0 # To view raid device in detail mdadm --detail /dev/md0 # To view status of RAID device use the command, watch cat /proc/mdstat OR cat /proc/mdstat status # Goto another console and mount the RAID block mkdir /RAID - /RAID is a mount point. mount /dev/md0 /RAID # Copy the /boot partition to /RAID cd /boot cp -R * /RAID/ # Fail the one partition in RAID block. mdadm --manage /dev/md0 --fail /dev/hda12 # Immediately after failing hda12 recovery starts on hda14 which is ...