Blogs

Howto Change Default text editor in Debian Etch

By Default Debian Etch Provides the nano editor you need to follow this procedure.In this example i want to use vi editor as my default editor.This is Veryuseful if you want to change Default editor to your own choice.

Full Story

How to Increase ext3 and ReiserFS filesystems Performance in Linux

This tutorial explains how to increase ext3 and ReiserFS filesystems Performance in Linux.The ext3 or third extended filesystem is a journalled file system that is commonly used by the Linux operating system. It is the default file system for many popular Linux distributions

Full Story

Inserting adsense code to multiple files...

Here's a quick bash script that I wrote to add adsense code just before the closing body tag in several accounts with the same file name. Could be modified to take the file names as the last argument if different.

Note: replace the UA-####### with your particular ID number assigned by adsense.

#!/bin/bash
# insert_adsense.sh
# usage: ./insert_adsense.sh {account} {count}

ACCOUNT=$1
COUNT=$2
FILE=/home/${ACCOUNT}/public_html/index.inc.php

ADSENSE="

<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\&quot;>
</script>
<script type=\"text/javascript\&quot;>
_uacct = \"UA-#######-${COUNT}\&quot;;
urchinTracker();
</script>

"

cp $FILE $FILE.bak

replace "</body>" "${ADSENSE}</body>&quot; -- $FILE

exit 0

Automatix2 Setup in Debian Etch

Automatix is a graphical interface for automating the installation of the most commonly requested applications in Debian based Linux operating systems.

Full Story

NFS Server and Client Configuration in Ubuntu

NFS was developed at a time when we weren’t able to share our drives like we are able to today - in the Windows environment. It offers the ability to share the hard disk space of a big server with many smaller clients. Again, this
is a client/server environment. While this seems like a standard service to offer, it was not always like this. In the
past, clients and servers were unable to share their disk space.

Full Story

masquerade with iptables

Allows for easy sharing of internet connection to an internal network with dynamic IP range.

# iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE

Sending mail to a SMTP server using telnet

$ telnet remotehost 25
HELO localhost
MAIL FROM: johndoe@localhost
RCPT TO: jilldoe@remotehost
DATA
Subject:Test Message
This is a test message.
.
QUIT

RAID notes...

  1. Create RAID-1 level array with 2 active devices and 1 spare:
    # mdadm -C /dev/md0 -l 1 -n 2 /dev/hda{8,9} -x 1 /dev/hda10

    Note: RAID-1 provides for redundancy and needs a minimum of 2 partitions and any number of spares.

  2. Show details:
    # mdadm --detail /dev/md0
  3. Mark Faulty:
    # mdadm --manage /dev/md0 -f /dev/hda8

    Note: When partition is marked faulty, the spare quickly replaces it in RAID 1 array.

  4. Remove:
    # mdadm --manage /dev/md0 -r /dev/hda8

    Note: Only faulty partitions can be removed.

  5. Add:
    # mdadm --manage /dev/md0 -a /dev/hda8

    Note: Only removed partitions can be added.

  6. Stop RAID:
    # mdadm --stop /dev/md0
  7. Run RAID:
    # mdadm --assemble /dev/md0 /dev/hda{8,9,10}

    Note: Before assembling, check on the UUID of the devices. They should all be the same and show only one array:

    mdadm --examine --scan /dev/hda{8,9,10}

  8. Remove the md signature from disk
    # mdadm --zero-superblock /dev/hda{8,9,10}
  9. Scan md superblock
    # mdadm --examine --scan
  10. Scan currently active arrays
    mdadm --detail --scan
  11. Monitor RAID:
    # nohup mdadm --monitor --mail=root --delay=300 /dev/md0 &

DNS server Setup using bind in Ubuntu

DNS Stands for Domain Name Service.On the Internet, the Domain Name Service (DNS) stores and associates many types of information with domain names; most importantly, it translates domain names to IP addresses

Full Story

File Server Configuration in Debian Using Samba

Samba is a suite of Unix applications that speak the SMB (Server Message Block) protocol. Many operating systems, including Windows and OS/2, use SMB to perform client-server networking. By supporting this protocol, Samba allows Unix servers to get in on the action, communicating with the same networking protocol as Microsoft Windows products.

Full Story

Comment