clearing the arp cache in linux

You can clear the arp cache using following commands:

Current arp cache
root@server [~]# arp -n
Address HWtype HWaddress Flags Mask Iface
70.167.140.1 ether 00:00:0C:9F:F0:04 C eth0

 
Clearing arp cache with verbose
root@server [~]# ip -s -s neigh flush all
70.167.140.1 dev eth0 lladdr 00:00:0c:9f:f0:04 ref 42 used 17/0/65 REACHABLE
*** Round 1, deleting 1 entries ***
70.167.140.1 dev eth0 ref 42 used 0/0/0 INCOMPLETE
*** Round 2, deleting 1 entries ***
*** Flush is complete after 2 rounds ***

 
Current entries
root@server [~]# arp -n
Address HWtype HWaddress Flags Mask Iface
69.167.140.1 ether 00:00:0C:9F:F0:04 C eth0

You can also delete specific arp entries using the two following command
root@server [~]# arp -d 192.168.1.1
root@server [~]# arp -d 192.168.1.2

 
Add a static arp entry

root@server [~]# arp -s 192.168.1.10 00:00:93:12:04:57

tested on CentOS release 5.7 (Final)

Villustrator

From bilalquadri.com

Here is a nice little addition to vi or vim. You can create a custom theme for vi/vim and download it to use locally. Nice!

From their FAQ:

Where do I put the colorscheme I just downloaded?
The colorscheme should be put in “~/.vim/colors”. If those directories don’t already exist, you will need to create them.

I’m using Vim in the terminal. How can I use my colorscheme outside of gvim?
There are few things to note here:
• Make sure you tell Vim how many colors your terminal supports. Just add this line to your .vimrc file in your home directory:
let &t_Co=256

Use 88 instead of 256 if that’s what your terminal supports.
• Download and unzip this plugin into the ~/.vim directory. After that, you should be set.

How do I change my colorscheme?
Just type “:colorscheme ” in Vim without the quotes. Tochange the default colorscheme, just add that line to your .vimrc file in your home directory.

From bilalquadri.com

Reset visual and editor to use Vim

Hi,

I ran across a small issue where the client wanted to use vim as the default editor for crontab as opposed to pico. I was able to modify this by using the following commands;

EDITOR=vim;
export EDITOR
VISUAL=vim;
export VISUAL=vim

and done…

Now, when editing crontab, it uses vim. Simple.

Install Mongodb

From mongodb.org
From if-not-true-then-false.com
From php.net

To install mongodb, add the appropriate repo information below for your distribution version (x86_64 or i686) to /etc/yum.repos.d/10gen.repo:

vim /etc/yum.repos.d/10gen.repo

add


[10gen] name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0

or

[10gen] name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0

then run

yum update && yum install mongo-10gen mongo-10gen-server

Check the basic mongodb configuration settings before starting MongoDB (default settings are usually good)


vim /etc/mongod.conf

logpath=/var/log/mongo/mongod.log
port=27017
dbpath=/var/lib/mongo

Continue reading “Install Mongodb”